You are here: Re: Reverse mysql-result « PHP Programming Language « IT news, forums, messages
Re: Reverse mysql-result

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация