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 'p.catalog_parent='0'' at line 6 in: [select count(*) as total FROM zen_products p
LEFT JOIN zen_manufacturers m
ON (p.manufacturers_id = m.manufacturers_id), zen_products_description pd
WHERE p.products_id = pd.products_id AND p.products_status = 1 AND p.catalog_parent=0
AND pd.language_id = 42 and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 90and p.catalog_parent='0']