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 classid in (184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,' at line 1
SELECT COUNT(*) as total FROM `***_ecms_code` WHERE and classid in (184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203) and ((title LIKE '%%')) LIMIT 500