Error 1064 in MySQL is a syntax error. Look in your query for something like:
Code:
...AND foo = 0 AND bar = AND something...
or
Code:
...foo = 0, bar =, something =...
...and notice the bold parts where a column name is given but no value for the column. The vast majority of the time it is caused by trying to use a numeric value when the value is actually boolean, and because false evaluates to an empty string in PHP, you can get this error. Try wrapping the variable with
http://www.php.net/intval .
In any case, this error is very, very common, so please [high]
search extensively before posting.[/high]