"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 A.type_id = 3 AND A.catalog_status = '0'' at line 4" :: SELECT A.*, B.*, A.catalog_description AS catalog_color, 0 AS discont_local FROM kwa_catalog_stuff AS A LEFT JOIN kwa_catalog_stuff_names AS B ON A.catalog_id = B.catalog_id WHERE A.catalog_group_id IN () AND A.type_id = 3 AND A.catalog_status = '0'