Page 1 of 1

2 Sort by's

Posted: Thu Sep 21, 2006 11:21 am
by nickman013
Hello,

I need to sort two querys. Like I have a sort by ID but now I need it to be sort by ID and then somethign else. So it puts everything in order by ID and then by the other number.

Posted: Thu Sep 21, 2006 11:42 am
by Luke
...why? :?

Posted: Thu Sep 21, 2006 3:00 pm
by feyd
Is there a question in that post nickman013? I don't see one.

Posted: Thu Sep 21, 2006 4:02 pm
by Benjamin
Looks like he's asking how to sort by 2 fields in a query, something like..

Code: Select all

SELECT * FROM `table` WHERE `fieldOne`='this' ORDER BY `fieldTwo`,`fieldThree` ASC;
Shouldn't be too far off.