Query: SELECT COUNT(*) as number FROM events LEFT JOIN committees ON (committees.id=events.committee) LEFT JOIN sponsors ON (sponsors.id=events.sponsor) LEFT JOIN users ON (users.id=events.user) WHERE events.committee= AND events.valid=1 AND (DATEDIFF('2012-04-01', begin)>0 AND DATEDIFF(begin,'2011-04-01')>0)
Error: 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 'AND events.valid=1 AND (DATEDIFF('2012-04-01', begin)>0 AND DATEDI' at line 1