PHP: How to display the last 10 entries in MySQL table?

?????l???

New member
So, if I have a table with 2 fields, id and name, and the id field is just an auto-incremented integer, and name is a name inputted into the table, how can you display the newest 10 or so entries (the ones with the highest id value)?

***example table named Entries***
id______________name
1______________Jane
2______________Bob
3______________John
4______________Susan
5______________Dan


How would you output the latest one or two entries, if it's always changing? You can't just output the 5th entry because eventually there'll be a 6th, and 7th, etc. I'm not really familiar with limits and things like that. Can I just have a very simple example? I can edit it to fit what I need. Google's not helping much right now.
I totally forgot about Order By!! I could have sworn I knew how to do it before. Thanks!!
 
Back
Top