I have a MySQL 5.0 server, and I’m running this query:
SELECT *
FROM deals
WHERE expires > "2012-05-25 19:37:58"
AND city =2
ORDER BY UIN
LIMIT 48 , 57
And it’s returning:
Showing rows 0 – 29 (57 total, Query took 0.0036 sec)
Am I doing something wrong? I expect 9 rows, 48-57..
The second parameter to
LIMITis not an offset, it’s a length relative to the offset. So if you want 9 rows, it would beLIMIT 48, 9.