"Vern" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Problem with that is it sorts according the results of the recordset
range.
>
> For instance:
>
> It will show the user 1 trhough 10 sorted by miles then 20 - 30 sorted by
> miles, however, in 1 through 10 could have a range of 0 to 1000 miles and
> the next set will have 5 to 200 miles. What I need is to sort them all by
> miles first. The only way I know to do that is to do the way I set it up.
So
> if I create an array, sort that array by the miles then use that array.
> However the array is different that the recordset and thus does not use
> LIMIT.

What about this:
SELECT * FROM table ORDER BY miles LIMIT 0, 10

Then pass the offset to your query function and exchange it with 0:
SELECT * FROM table ORDER BY miles LIMIT $offset, 10

Of course you have to properly validate that $offset is an integer before
using it in the query.

Regards, Torsten Roehr

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to