I got an odd problem. Whenever I add a new entry to the database it gives it a higher id number, but somehow sees it as a lower number and puts it below the older ones.
And when sorting DESC in PHP I also get this order, does anybody know whats going wrong here?
I use $res = mysql_query("SELECT * FROM data ORDER BY 'id' DESC");to sort them, and it gives the same order as in the pic. (Not sure why i’m being downvoted here but ok..)
Pic:

Your query is:
You are sorting by the string
'id', note the syntax highlighting when not within quotes. This means you get them in a random order. Remove the'. If you meant to escape the columnidyou should use back-ticks: