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..
In MySQL the LIMIT clause is used with the SELECT statement to restrict the number of rows in the result set. The Limit Clause accepts one or two arguments which are offset and count. The value of both the parameters can be zero or positive integers.
Yes, it is possible to use UPDATE query with LIMIT in MySQL.
The MySQL maximum row size limit of 65,535 bytes is demonstrated in the following InnoDB and MyISAM examples. The limit is enforced regardless of storage engine, even though the storage engine may be capable of supporting larger rows.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With