Q:

MySQL LIMIT not working

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..

A:

The second parameter to LIMIT is not an offset, it's a length relative to the offset. So if you want 9 rows, it would be LIMIT 48, 9.

A:

LIMIT 48 , 57

will show 57 records following the 48th record.
Try
LIMIT 48 , 9

http://php.about.com/od/mysqlcommands/g/Limit_sql.htm

