|
Posted by Tony on 06/29/05 01:08
frizzle wrote:
> Hi there,
>
> Short question:
> Is there any way, to reverse the result of a mysql query?
>
> Explanation:
> If i have eg. 20 records, all with their own id of course,
> select 5 with limit, and order them DESC by ID, it should give
> me: 20, 19, 18, 17, 16. That's all ok.
> But now i want 16 to appear first, 17 second, etc.
You want to change the order it displays in, or you want to display it one
way first, then the other way?
You could read the records into an array, but I'm wondering at the
processing power being used. It may be more efficient to simply reissue the
query with a modification to the ORDER BY clause. Code-wise, it would
certainly be simpler...
--
Tony Garcia
Web Right! Development
Navigation:
[Reply to this message]
|