got the initial error again...
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 'ANDProductID IN (SELECT ProductID FROM ps3_productcategories AND(CategoryID = 6)' at line 1