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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.