Jump to content

Archived

This topic is now archived and is closed to further replies.

bwaxse

5 Most Recent Entries

Recommended Posts

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!

Share this post


Link to post
Share on other sites
You mean something like:

[code]SELECT PostID FROM tbl_posts ORDER BY dtUpdated DESC LIMIT 5[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.