在MYSQL PHP日期中排序

时间:2016-11-10 09:51:14

标签: php mysql

$mydate = date('H:i, j F Y');
11:51, 11 November 2016

这里有什么问题?

SELECT id, mydate, DATE(mydate) AS DATE2 FROM myTable ORDER BY DATE2 DESC LIMIT 5

它向我显示如下:

11:41, 10 November 2016
20:17, 4 November 2016
22:49, 9 November 2016
21:04, 9 November 2016
21:32, 3 November 2016

0 个答案:

没有答案