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 'LIMIT 18, 18' at line 10(No Description) sql: SELECT * FROM products p WHERE enabled = 1 AND parent_id = 0 AND hidden = 0 AND salesrank <> 0 AND 1 = 1 AND id IN (4476,748,7298,779,2202,5022,2460,905,4842,1102,2055,1746,6453,2173,835,6408,4942,2948,7320,1164,7036,7164,7345,7327,3985,1505,7346,5748,1057,1387,7317,2158,6960,1795,7337,1070,3623,7344,1404,5078,2155,3033,1903,1942,2682,1405,6452,7347,3054,3267) ORDER BY LIMIT 18, 18