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 'and (c.parent_id IN(SELECT categories_id FROM categories WHERE parent_id='6361')' at line 10

select distinct p.products_model, p.products_id, p.products_quantity, p.products_image, p.products_tax_class_id, pd.products_description, pd.products_description_short, pd.products_description_premium, pd.products_description_shop, p.products_price as org_products_price, if(s.status, s.specials_new_products_price, p.products_price) as products_price ,pd.products_name from products p left join products_description pd on p.products_id = pd.products_id left join specials s on p.products_id = s.products_id, products_to_categories p2c, categories c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and pd.language_id = and (c.parent_id IN(SELECT categories_id FROM categories WHERE parent_id='6361') OR c.parent_id = '6361') and p.products_status = '1' order by p.products_date_added desc limit 9