Posted by Simon on 10/19/05 17:42
> Gerard wrote:
>> Providing that u know what xx is there two other needed variables are
>> the xx-5 and xx+5
>>
>> so then
>>
>> $start = $xx-5;
>> $stop = $xx+5;
>>
>> SELECT * FROM Articles WHERE id >= $start AND id <= $stop;
>>
>> I think this is what you're looking for.
>>
>
> This assumes, of course, that there are no gaps in the sequence of
> IDs...
>
You are right, there are gaps in the sequence.
Simon
[Back to original message]
|