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 (748,4476,7298,2202,5022,6453,905,1102,1903,2460,7346,1405,2055,7341,1746,7353,2173,7337,835,6452,6408,4942,779,2948,6960,4842,7164,7345,3985,3267,7327,5748,1057,5078,1795,5549,754,1618,1164,7036,3623,1404,2155,3033,6247,783,7343,1070,6715,7356) ORDER BY LIMIT 18, 18