select count(*) from contentItems WHERE () AND 1=1 AND Str_Code IN (4,35,33,34,13) AND Ite_State=0 AND Ite_BDate<='2012-05-19' AND Ite_EDate>='2012-05-19': 1064: 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 1=1 AND Str_Code IN (4,35,33,34,13) AND Ite_State=0 AND Ite_BDate<='2012-0' at line 1