I have a mysql database. How do I select the most recent 10 records? Im not storing timestamps. But the most the recent records are the ones at the bottom rite? Also. How so I get the next ten , the next ten and so on on clicking a button. Kinda like a bunch of forum posts. The recent ones show up first.
Share
If you have an
AUTO_INCREMENTcolumn you can order by that in descending order then limit by 10.But I suggest you store timestamps and order by that instead so you know you’re sorting your records according to date, and not some other value that coincides with date of insertion.