PHPNewbie55 Posted December 17, 2007 Share Posted December 17, 2007 Is there any way to sort by more than one field..?? <?php mysql_query("SELECT * FROM table_name ORDER BY field 1 and field 2") ?> Quote Link to comment Share on other sites More sharing options...
p2grace Posted December 17, 2007 Share Posted December 17, 2007 Try this: mysql_query("SELECT * FROM table_name ORDER BY `field1`,`field2`"); Quote Link to comment Share on other sites More sharing options...
papaface Posted December 17, 2007 Share Posted December 17, 2007 SELECT column_name(s) FROM table_name ORDER BY column_name1, column_name2 Quote Link to comment Share on other sites More sharing options...
PHPNewbie55 Posted December 17, 2007 Author Share Posted December 17, 2007 Cool that works... Now I onlyhave one more question before I start my day and recode a bunch of stuff...... THANK YOU! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.