mysql_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 RegisterStartDate <= '2014-08-27' AND RegisterEndDate >= '2014-08-27'' at line 1
SELECT count(*) FROM Periods WHERE ID = AND RegisterStartDate <= '2014-08-27' AND RegisterEndDate >= '2014-08-27'