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 'or c.parent_id=)' at line 1

select count(distinct p.products_id) as total from products_to_categories p2c left join products p on p2c.products_id=p.products_id left join products_description pd on p2c.products_id=pd.products_id left join products_attributes pa on (pa.products_id=p.products_id) left join categories c on p2c.categories_id=c.categories_id where pd.language_id='1' and p.products_status=1 and pd.products_name<>'' and p.products_price <> 8888 and (c.categories_id= or c.parent_id=)

[TEP STOP]