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! Quote 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] Quote Link to comment https://forums.phpfreaks.com/topic/15997-5-most-recent-entries/#findComment-65964 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.