MySQL ~ order by field DESC but ASC

當想要ORDER BY `date` DESC

可是在他輸出的時候卻又要`date` ASC

作法就是

子查詢~

SELECT * FROM
(SELECT * FROM xxx ORDER BY `date` DESC LIMIT 10) as tbl
ORDER BY `date` ASC


沒有留言:

發佈留言