SELECT id, parent_id, name_az, image FROM site_products_categories t1 WHERE t1.site_id=1 AND (parent_id IN ()) ORDER BY t1.ordering DESC 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 t1.ordering DESC' at line 1