...

View Full Version : Whats wrong with this query :X?



ole90
08-09-2008, 12:34 AM
It keeps giving me an error so i echo'd it out but i can't find anything wrong with it. Can you :X?


SELECT * FROM `gm_hm` WHERE `ID` = '4', `l1` = 'o', `l2` = 'l', `l3` = 'e', `l4` = '_', `l5` = 'l', `l6` = 'i', `l7` = 'k', `l8` = 'e', `l9` = 's', `l10` = '_', `l11` = 'c', `l12` = 'a', `l13` = 'k', `l14` = 'e', `l15` = '_', `l16` = '_', `l17` = '_', `l18` = '_', `l19` = '_', `l20` = '_', `l21` = '_', `l22` = '_', `l23` = '_', `l24` = '_', `l25` = '_'


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 ' `l1` = 'o', `l2` = 'l', `l3` = 'e', `l4` = '_', `l5` = 'l', `l6` = 'i', `l7` = ' at line 1

Nightfire
08-09-2008, 12:37 AM
Instead of comma's, you should be using AND or OR, depending on what you're trying to do.

masterofollies
08-09-2008, 04:18 AM
As nightfire said, do it like this.


SELECT * FROM `gm_hm` WHERE `ID` = '4' AND `l1` = 'o' AND `l2` = 'l' AND `l3` = 'e' AND



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum