比如查询一个用户列表,按注册日期排序
SELECT * FROM `user` ORDER BY `name` DESC
当按照用户名排序完后,再将这些排序结果按时间先后排,应该如何写。
就是说同时满足两个排序条件,线排用户名,再排注册时间
迷茫2017-04-17 11:04:46
ORDER BY `name` DESC, `reg_time` DESC
Please refer to: http://dev.mysql.com/doc/refman/5.0/e...
PHP中文网2017-04-17 11:04:46
order by name desc, created_at asc, updated_at desc
You can write as many as you like, just follow them!