Register • FAQ • Memberlist • Usergroups • Tutorials Point • Log in

| Page 1 of 1

Regarding a simple mysql query
Author | Message
--- | ---
webdevoman Joined: 08 Sep 2009 Posts: 2 | 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
Tue Sep 08, 2009 1:54 am |
webdevoman Joined: 08 Sep 2009 Posts: 2 | 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',
Tue Sep 08, 2009 3:15 am |

Display posts from previous: |

| 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

Powered by phpBB © phpBB Group Design by Vjacheslav Trushkin for phpBBStyles.com