An Error Was Encountered
Error Number: 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 ptc.hotornot = 1 and p.deleted = 0 order by p.fm_id LIMIT 9' at line 9
SELECT DISTINCT(p.products_id), p.fm_id FROM products_to_categories ptc INNER JOIN products p ON (p.products_id = ptc.products_id) INNER JOIN products_images pi ON (p.fm_id = pi.pim_pro_fm_id) WHERE ptc.categories_id = and ptc.hotornot = 1 and p.deleted = 0 order by p.fm_id LIMIT 9