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 ',-pulses- and c.status=1 and c.cat_type=0 and c.is_deal="No" and p.status=1 and ' at line 1