this is driving me nuts...why doesn't this line work ?
i have tried it as "group = $question", "group = 2", "group = ''", "group = 'y'", etc... taking out the group part of the query, it always runs fine...anytime i add it i getPHP Code:$sql = "select * from answers WHERE unit = $unit
AND section = $section AND question = $question AND
group = '2' AND correct = 'y' ORDER By rand() LIMIT 1";
this group column is the same crap as unit, section, question...all int(11)s. i.e., this works fine:You have an error in your SQL
syntax near 'group = '2' AND correct = 'y' ORDER By
rand() LIMIT 1' at line 1any ideas ? thanks,PHP Code:$sql = "select * from answers WHERE
unit = $unit AND section = $section AND question =
$question AND correct = 'y' ORDER By rand() LIMIT 1";
Geoff









Bookmarks