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 'on p.products_id = pd.products_id
where c.categories_status=1
' at line 9
select count(p.products_id) as total from products p join
products_to_categories p2c on p.products_id = p2c.products_id join
categories c on c.categories_id = p2c.categories_id left join
manufacturers m on (p.manufacturers_id = m.manufacturers_id),
products_description pd on p.products_id = pd.products_id
where c.categories_status=1
and p.products_status = '1'
and pd.language_id = '1'