T
T
thekot242016-08-28 22:50:36
SQL
thekot24, 2016-08-28 22:50:36

How to sort from newest to oldest?

With a database query:

SELECT * FROM `messages` ORDER BY `id` DESC LIMIT 50

I receive messages, BUT new ones are on top, and old ones are on the bottom. How to do the opposite? If you remove DESC - there will be a current of the first 50 ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dev400, 2016-08-28
@thekot24

asc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question