[Solved] How to order posts by date added [closed]


You want to sort on the datetime (or if that doesn’t exist you could use the ID, but that is not how “it should be”) in descending order instead of ascending.

Example query:

SELECT `title`, `text` FROM `news` ORDER BY `datetime` DESC LIMIT 5

https://dev.mysql.com/doc/refman/5.7/en/sorting-rows.html

solved How to order posts by date added [closed]