Previous Thread
Next Thread
Print Thread
Hop To
#44036 02/07/2005 6:04 PM
Joined: Oct 2004
Posts: 27
C
newbie
newbie
C Offline
Joined: Oct 2004
Posts: 27
I am looking for a way to get more stats on our forum.
how many posts there have been in the last 24 hrs, last week, last month etc...

any help would be greatly Appreciated

#44037 02/07/2005 7:20 PM
Joined: Jan 2004
Posts: 74
G
journeyman
journeyman
G Offline
Joined: Jan 2004
Posts: 74
I don't know if this is the "cleanest" way to query it, but it works for displaying how many posts have been made in the past 24 hours:

Code
SELECT COUNT(*) FROM w3t_Posts
WHERE ( UNIX_TIMESTAMP() - B_Posted ) / (3600 * 24 ) <= '1'

You can change the 1 to a 7 for a week or 30 for a month.


Visit the real Threadsdev at http://www.threadsdev.net

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
0 members (), 919 guests, and 149 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)