我有这个php查询
$Commentsq=$con->query("SELECT * FROM comments ORDER BY `DATE` DESC LIMIT 4 ");
所以我的结果就是这样 4 3 2 1 我怎样才能使结果成为现实 1 2 3 4
答案 0 :(得分:4)
您可以使用子查询:
SELECT *
FROM (SELECT *
FROM comments
ORDER BY `DATE` DESC
LIMIT 4) AS s
ORDER BY `DATE`;