ordering by 2 columns
Posted: Thu Jun 01, 2006 4:19 pm
I am doing a search where I need to search by 2 different columns..
`accounts`.`status` and `accounts`.`id`
Now status is an enum (paid, free, or expired) and id is autoincremented.. when I try to put both in them in the order by clause it will not work as expected, expected being
So in plain english, status paid comes up first (all I'm concerned about) and then it orders by descending Id's.. anyone know how I can accomplish this
`accounts`.`status` and `accounts`.`id`
Now status is an enum (paid, free, or expired) and id is autoincremented.. when I try to put both in them in the order by clause it will not work as expected, expected being
Code: Select all
paid 100
paid 82
paid 70
free 99
free 25
free 21