Reputation: 71
I'm working on a PHP application, where I need to display the 10 most recent MySQL database entries in a HTML table.
I'm not too sure how I'd go about doing this.
My database holds the date the item was submitted, and the time (in separate columns).
How would I retrieve the 10 most recent database entries in a HTML table?
Edit: Is it possible using ajax?
Upvotes: 0
Views: 395
Reputation: 1922
Maybe like this:
SELECT some, colums
FROM table
ORDER BY submitdate DESC, submittime DESC
LIMIT 10
Upvotes: 1