如何首先按
排序mysql查询(`superVip` DESC, `editDate` DESC) then (`vip` DESC, `editDate` DESC) (other ads sort by ID)
类似这样的事情
SELECT *
FROM `ads`
ORDER BY (`superVip` DESC, `editDate` DESC), (`vip` DESC, `editDate` DESC), `id` DESC
答案 0 :(得分:0)
只是sintax的问题,看:
SELECT * FROM ads ORDER BY superVip DESC, editDate DESC, vip DESC, editDate DESC, id DESC