Results 1 to 9 of 9
Thread: sorting on two different fields?
May 25, 2001, 13:23 #1
- Join Date
- Jan 2001
- Your basement
- 0 Post(s)
- 0 Thread(s)
sorting on two different fields?
My duBois book is at home so I figured I'd ask here to see if anyone has a quick answer. Is there a way to sort on two different fields AND arrange them differently with DESC,ASC?
For example... take this query (please)
SELECT * FROM table WHERE category='$id' ORDER BY field1,field2 DESC
That's great except that I want field1 sorted with DESC and then field2 sorted with ASC. This does not work:
SELECT * FROM table WHERE category='$id' ORDER BY field1,field2 DESC,ASC
Is there any way to do this without reading the results into an array and re-sorting it yourself?