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 categoryID IN (673, 1059)' at line 7
SELECT productID, categoryID FROM `SC_category_product` WHERE productID IN () AND categoryID IN (673, 1059)