Reputation: 39
I have got this php query
$Commentsq=$con->query("SELECT * FROM comments ORDER BY `DATE` DESC LIMIT 4 ");
So i result is this 4 3 2 1 How can i make the result come as 1 2 3 4
Upvotes: 1
Views: 24
Reputation: 175686
You could use subquery:
SELECT *
FROM (SELECT *
FROM comments
ORDER BY `DATE` DESC
LIMIT 4) AS s
ORDER BY `DATE`;
Upvotes: 4