[SOLVED] mysql - order the fields should be displayed

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

mysql - order the fields should be displayed

Post by nigma »

say I have a table with three fields: field1, field2, field3

I want to perform a query and want the results to be ordered by field2, field3, field1

I remember seeing a tutorial on how to do this a while ago, but can't find it now, anyone know how to do this?

Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

... ORDER BY field2, field3, field1
:?: :?
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

haha, don't laugh! thanks
Post Reply