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 ') ORDER BY a.publish_up desc LIMIT 0, 20' at line 5 SQL=SELECT a.id,a.alias,a.title,a.metadesc,a.catid,a.created_by,a.created_by_alias,c.name as author FROM sc_content as a LEFT JOIN sc_contentitem_tag_map as b on(a.id = b.content_item_id) LEFT JOIN sc_users as c on (a.created_by = c.id) WHERE b.tag_id in () ORDER BY a.publish_up desc LIMIT 0, 20