Exception Caught

SQLSTATE[42000]: Syntax error or access violation: 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 ') ORDER BY c.group_id, c.parent_id, c.cat_order' at line 7:
SELECT c.cat_name, c.cat_url_title, c.cat_id, c.cat_image, c.cat_description, c.parent_id, p.cat_id, p.entry_id, c.group_id , cg.field_html_formatting, fd.* FROM (exp_categories AS c, exp_category_posts AS p) LEFT JOIN exp_category_field_data AS fd ON fd.cat_id = c.cat_id LEFT JOIN exp_category_groups AS cg ON cg.group_id = c.group_id WHERE c.cat_id = p.cat_id AND p.entry_id IN () ORDER BY c.group_id, c.parent_id, c.cat_order

mysqli_connection.php:116