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 '' at line 2
in:
[select count(p.products_id) as total FROM products p WHERE (p.products_status = 1 AND p.products_quantity > 0 ]