Mysql order by using two columns

Posted by Krishna Priya on Stack Overflow See other posts from Stack Overflow or by Krishna Priya
Published on 2010-04-06T09:05:37Z Indexed on 2010/04/06 9:33 UTC
Read the original article Hit count: 345

Filed under:

Hi, I am using a table which has Createdon and Lastmodifiedon fields, I have to display first the newly added record based on createdon and then followed by lastmodifiedon records using mysql. I have tried adding "ORDER BY Createdon,Lastmodifiedon desc" at the end of the query;but sorting based on first column only occurs. Anyone please help in this issue

Thanks.

© Stack Overflow or respective owner

Related posts about mysql