FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » uasort strange problem
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: uasort strange problem [message #173447 is a reply to message #173429] Wed, 13 April 2011 11:18 Go to previous message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma:
Senior Member
Peter <pete(dot)ivesAll_stRESS(at)blueyonder(dot)co(dot)uk> wrote:

> Hi all,
>
> I currently have a list of products stored in a multi-dimensional array
> which contains, amongst other fields, the product's name, heading
> 'name', and the product's price, heading 'price' and I want to be able
> to sort the array by name ascending/descending and price
> ascending/descending.
>
> The array is originally created from a mysql database using various
> tables and so I have not been able to create a simple, mysql query that
> allows me to return the data already sorted. There are various reasons
> for this which I don't wish to go into here, being a php forum.

With most relational databases (I don't use mySQL) you can set up
separate views that contain only a subset of the data and have it kept
sorted. Generally a view doesn't cost much at all in terms of
performance.

--
no aluminum siding offers today
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Joomla, Wordpress, Expression Web
Next Topic: How can I serialize zend_http_request object?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 19:26:14 GMT 2024

Total time taken to generate the page: 0.05098 seconds