webworks
Members
-
Joined
-
Last visited
Reputation Activity
-
webworks reacted to Renaissance-Design in ordering by ASC id but latest insertsIf the ID field is auto-incrementing, the newest posts will always have the highest values. If you order by DESC instead, you'll get the latest 20. If they're in the wrong order you can assign the returned values to an array and reverse it before you use it.
Edited for clarity:
ASC vs DESC looks at the whole dataset or table to get the values, and takes the number specified by LIMIT from either the top (DESC) or the bottom (ASC).