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 p.manufacturers_id = ) AND p.products_id NOT IN () order by RAND() limit 4' at line 1

select distinct(p2s.products_id) as products_id, p.products_quantity, p.products_id, p.products_image, p.products_tax_class_id, p.products_date_available, pd.products_name, fp.product_id, IF(s.status = '1' AND s2s.stores_id = '1', sfp.products_price, fp.products_price) as productprice from products p, fixed_prices fp left join specials s on p.products_id = s.products_id left join specials_to_stores s2s on s2s.specials_id = s.specials_id left join specials_fixed_prices sfp on s.specials_id = sfp.specials_id and sfp.code = 'USD', products_description pd,products_to_stores p2s,products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and products_listing_status != 0 and p2s.products_id = p.products_id and p2s.stores_id = 1 and fp.product_id = p.products_id and fp.code = 'USD' and p2c.products_id = p.products_id AND (p2c.categories_id = OR p.manufacturers_id = ) AND p.products_id NOT IN () order by RAND() limit 4

[TEP STOP]