如何以其他方式排序(mysqli)

my question as I instructions in a sql sorting can put upside down. I currently use "ORDER by id DESC" does anyone know how I can get the other way around?

This is my code:

"SELECT ip FROM chat WHERE datum > '".$timestamp."' GROUP BY ip ORDER BY id DESC"

You can use:

SELECT ip FROM chat WHERE datum > '".$timestamp."' GROUP BY ip  ORDER BY id ASC

ASC = The default sort order is ascending, with smallest values first. To sort in reverse (descending) order, add the DESC keyword to the name of the column you are sorting by:

"SELECT ip FROM chat WHERE datum > '".$timestamp."' GROUP BY ip ORDER BY id ASC"

SE THE DOCUMENTER OF SORTING ROWS

Just use

ORDER BY id 

This will do in ascending order.

By default when Order by column its ascending. If explicitly specified as DESC then the ordering is done is descending order in MySql