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 'SELECT DISTINCT p.products_image, pd.products_name,
' at line 1
select count(p.products_id) as total SELECT DISTINCT p.products_image, pd.products_name,
p.products_id,
p.products_image , p.products_price,
p.products_tax_class_id,
IF(s.status, LEAST(s.specials_new_products_price, p.products_price), p.products_price) as final_price FROM (products p
LEFT JOIN specials s using(products_id) ),
products_description pd WHERE p.products_status = '1'
AND pd.products_id = p.products_id
AND pd.language_id = '1'
AND DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= p.products_date_added