bwaxse Posted July 30, 2006 Share Posted July 30, 2006 Hey all,I am trying to set up a section of my site that displays the latest updated posts. Each post has a dtUpdated column in the database that gets a timestamp when changed. When Im trying to look though the database, whats the best way to get the 5 most recent? I think im supposed to ORDER by dtUpdated DESC, but was wondering what it would look like.I need PostID's from tbl_posts that have the most recent updates.Thanks for all your help! Link to comment https://forums.phpfreaks.com/topic/15997-5-most-recent-entries/ Share on other sites More sharing options...
fenway Posted July 30, 2006 Share Posted July 30, 2006 You mean something like:[code]SELECT PostID FROM tbl_posts ORDER BY dtUpdated DESC LIMIT 5[/code] Link to comment https://forums.phpfreaks.com/topic/15997-5-most-recent-entries/#findComment-65964 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.