I am writing a site where I will have a news feed of updates on the front page. I have a table that will store the posts. Its fields are post_id, topic, body, and dateposted. I would like for it to search through the table and get the ten latest posts. What would be the easiest way to do this?

Recommended Answers

select post_id, topic,body, dateposted order by dateposted desc limit 0,10
Jump to Post

All 2 Replies

select post_id, topic,body, dateposted order by dateposted desc limit 0,10

LIMIT 0,10
That totally helped. Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.