You are here: Re: Complex array sorting « PHP Programming Language « IT news, forums, messages
Re: Complex array sorting

Posted by Shelly on 11/27/07 18:15

cronet wrote:
> Hi,
>
> i want to do some sortings to a complex array.
> The array structure is at the end of this message
>
>
>
> Now I want the result sorted in that way:
> SingleRoom ($hotel[0][Rooms][0][max_persons]) - lowest rate ($hotel[0]
> [Rooms][0][overall])

How did you fill the array? I assume it was from a database search. If so,
why not simply let SQL do the sorting for you.. All you need then would a
clause such as ORDER BY room_size, rate, max_people DESC.

Shelly

 

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

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