Welcome Guest, Not a member yet? Register   Sign In
sorting database results by multiple keys
#1

[eluser]Bogdan Tanase[/eluser]
Hi,

I'm trying to sort some database results (which are modified after SQL query) by more than one field. something like ORDER BY clause in SQL.

I've got to the point of using usort and a callback function for sorting by one field, but I can't seem to find a way of sorting by multiple fields.

Any ideas, or a link towards a more advanced sorting algorithm for arrays?

Thanks!


Messages In This Thread
sorting database results by multiple keys - by El Forum - 11-03-2008, 10:33 AM
sorting database results by multiple keys - by El Forum - 11-03-2008, 05:37 PM
sorting database results by multiple keys - by El Forum - 11-03-2008, 11:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB