select name as main_name, object_main_id as main_id, alias, description, default_style from cts_object_main where published ='0' and object_main_id IN() AND cts_object_main.domain LIKE '%ORG%' Order by ordering asc: 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 cts_object_main.domain LIKE '%ORG%' Order by ordering asc' at line 15