You can not specify negative value to LIMIT clause:
LIMIT -20,20
It means you want to return 20 rows starting from -20 which is wrong.
Sarfraz
2010-07-28 09:01:29
You can not specify negative value to LIMIT clause:
LIMIT -20,20
It means you want to return 20 rows starting from -20 which is wrong.
The OFFSET value of the LIMIT clause has to be a nonnegative integer constant. Quoting the MySQL Documentation:
The
LIMITclause can be used to constrain the number of rows returned by theSELECTstatement.LIMITtakes one or two numeric arguments, which must both be nonnegative integer constants (except when using prepared statements).