Click to See Complete Forum and Search --> : sort more than one field


tonyB
06-01-2006, 01:53 AM
I'm manipulating a mySQL database from PHPmyAdmin, and don't see how to sort by more than one field. I want to sort 'date' first, then 'author' second, in ascending order. This is not available in "Operations". Presume I'll have to use command line syntax. What would this syntax be? Thanks...

NogDog
06-01-2006, 02:18 AM
Basically:

SELECT * FROM table_name ORDER BY date, author;

(Note that this is just ordering the display of data, the actual database does not change at all.)