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 p.products_id = '17241' and p.products_status = '1' and p.products_id = p2c.' at line 1

select p2c.categories_id from products p, products_to_categories p2c left join categories c on p2c.categories_id=c.categories_id where c.catalog_id= AND p.products_id = '17241' and p.products_status = '1' and p.products_id = p2c.products_id limit 1

[TEP STOP]