www.tutorialspoint.com Forum Index
Register FAQMemberlistUsergroupsTutorials PointLog in
Reply to topic Page 1 of 1
Regarding a simple mysql query
Author Message
Reply with quote
Post Regarding a simple mysql query 
First off I want to say how great this site is. I will be here often reading the tutorials etc..

My problem is self explanatory really. I am having trouble with the following query. Can anyone help me fix this. I know I have messed up the "where" clause badly...

Code:
SELECT *
FROM userfield AS userfield
LEFT JOIN user AS user ON (user.userid = userfield.userid)
WHERE user.usergroupid = 15 AND user.userfield = 19, 20, 7, 12, 13, 18, 14, 15, 16, 17,


Thanks so much

webdevoman

View user's profile Send private message Send e-mail Visit poster's website
Reply with quote
Post  
I think I figured this out.. Is this correct??

Code:
SELECT *
FROM userfield AS userfield
LEFT JOIN user AS user ON (user.userid = userfield.userid)
WHERE user.usergroupid = 15 AND user.userfield = '19' and '20' and '7' and '12' and '13' and '14' and '15' and '16' and '17' and '18',


View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum