RichieBoy67
09-08-2009, 12:30 AM
Hey all,
This is self explanatory I guess. Can someone please fix this for me?? I know I am messing up with the Where clause...
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 much
webdevoman
--------------- Added 07 Sep 2009 at 23:12 ---------------
I think I have it-- Is this it??
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',This is not it either--
Error
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',
LIMIT 0 , 30
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
LIMIT 0, 30' at line 4
This is self explanatory I guess. Can someone please fix this for me?? I know I am messing up with the Where clause...
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 much
webdevoman
--------------- Added 07 Sep 2009 at 23:12 ---------------
I think I have it-- Is this it??
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',This is not it either--
Error
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',
LIMIT 0 , 30
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
LIMIT 0, 30' at line 4