Jump to content

ORDER BY more than one?


Kryptix

Recommended Posts

How would I order a SELECT by one column followed by another and another?

 

So for example, I want to order them by their name first, then their age and then their DoB.

 

I tried ORDER BY `name`, `age`, `DoB` but it doesn't give the results I'm expecting. Am I doing it right? Also, can you make say the name DESC, and then the age ASC separately?

Link to comment
https://forums.phpfreaks.com/topic/185425-order-by-more-than-one/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.