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 sponsor= AND valid=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 valid=0' at line 1