List:General Discussion« Previous MessageNext Message »
From:Johan Engström Date:June 2 1999 5:53am
Subject:Re: LIMIT problems
View as plain text  
> +----------+
> | count(*) |
> +----------+
> |      109 |
> +----------+

So you have 109 records in the table...

> mysql> select * from MY_TABLE limit 5,109;
> [...]
> 104 rows in set (0.18 sec)

And select 109 (maximum) starting at record 5. Of course
you get only 104 rows.

> mysql> select * from MY_TABLE limit 5,20;
> [...]
> 20 rows in set (0.02 sec)

And here you obviously get all of the 20 records starting
from 5.

> see anything wrong?  :>

No..? The second parameter in limit is the COUNT, not a 
second record-index, if that's what you thought.

Regards,

Johan

Thread
LIMIT problemspatrick2 Jun
  • Re: LIMIT problemsjohan.engstrom2 Jun
    • Re: LIMIT problemspatrick2 Jun