MySql status order by -


I have a query in the message table and I want them to resolve the message status. The people whose status is 'unread' and recently they should come first.

This is my code

as the message, message, log, user where recepient = 11 and sender = Message as the user_id
message_id, sender, panename, dp, message, TIMEDIFF (now (), date_set)

command :

  message_id, sender, select penname, dp, message, TIMEDIFF (now (), date_cent ) Date, status as the message, where the user is located by the recepient = 11 and the sender = user_id End = 'Unread' character, date_sent desc;  

This date puts all "unread" ones on top, then in the descending order, then the remaining messages.


Comments