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 adminstatus = 'approved'' at line 3
Error No: 1064
SELECT count(*) FROM `customer_message` cm WHERE 1=1 AND cm.to_customerid = AND adminstatus = 'approved'