PDA

View Full Version : Show Number of Post in the last 24hrs on forumhome


mcyates
07-12-2006, 11:13 AM
Is this possible, as i would like to show the number of posts that have been posted on the forums, in the last 24hrs.

Thanks

amykhar
07-12-2006, 11:24 AM
There are two ways to do this. If you have a small board, it's enough to query the database and count the number of posts made in the past 24 hours and show that number.

On a big board, it would probably be better to store a counter in the database that is incremented every time a post is made. The counter could be reset by a cron job. You could keep the counter in the datastore and just pull it for display when needed. It's more work this way, but probably easier on the processing for a larger site.