Re: Multiple Order By
| From: | Januar R. Kramadibrata | Date: | Sun, 25 Mar 2001 15:19:15 +0000 |
| Subject: | Re: Multiple Order By | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7774@lists.php.net to get a copy of this message | ||
Make it to:
select * from Blah where test='testing' order by field1, field2
One step further:
if you want field1 ascendingly ordered and field2 descendingly ordered, make it to:
select * from Blah where test='testing' order by field1 asc, field2 desc
Hope this help.
Warmest Regards,
Januar - Bandung, Indonesia.
At 10:49 PM 3/25/01 +0930, you wrote:
Hi There, I have a situation that requires me to do a multiple orderby on a MYSQL /PHP query. ie select * from Blah where test='testing' order by field1 then by field2 I am wondering if this will work or is there some other way I can acomplish such a task. The ordering should be decending. Thanks for any help on this. - Shannon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net