Jump to content

complex sort


spooke2k

Recommended Posts

Hi i have a table i need to sort information into via the total cost, now i cant do certain calculations easly in mysql because of the varying variables depending on what it brings back, so im using php to work the calculation out on the webpage.  But i want to display the information in a table in desc order from total cost.

 

So say i have 4 results 

 

A=10

B=11

c=1

D=-10

 

i need to find a way play them in order of the total i worked out.

 

I know i can stick the results into an array after i worked out the calulations

but im not sure best way to sort them once i have them in an array.

 

Thanks

 

Spooke2k

 

Link to comment
https://forums.phpfreaks.com/topic/63694-complex-sort/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.