MySQL Query : SELECT COUNT(*) as count FROM v9_producta P left join v9_attr_product AP on P.id=AP.productid where P.status=99 AND P.catid='19' and (P.procat =36879 or P.procat in() ) group by p.id order by p.id desc 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 ') ) group by p.id order by p.id desc' at line 1 MySQL Errno : 1064 Message : 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 ') ) group by p.id order by p.id desc' at line 1 Need Help?