|
Posted by Rik on 07/31/06 13:22
bizt wrote:
> Hi,
>
> I want to find an easy way to select only rows within a certain range
> when I do a select. Im sure I have seen this done with a SELECT
> statement but cant remember if or how it was done. Can someone help
> please.
>
> If not SELECT, whats the simplest way to do this? I have in the past
> selected all rows, and using a counter and conditional statement I
> will only output if within range
>
> //while shifting through the table select
> if (($i > 10) and ($i < 21))
> {
> //within range, output
> }
>
>
> Is this the simplest method? cheers
No.
Add " LIMIT 11, 10" to your query, and get only the rows you need. Check the
MySQL manual for the exact workings.
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|