• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Get number of active users and daily avg posts/threads?

RickM

Well-known member
#1
Hi,

I was wondering if anyone could tell me how you work out how many users have been active within X days or months. Also, is it possible to find out how many posts have been made each day?

Thanks,

Rick
 

Jake Bunce

XenForo moderator
Staff member
#2
I was wondering if anyone could tell me how you work out how many users have been active within X days or months.
Run this query:

Code:
SELECT COUNT(*) AS activeUsers
FROM xf_user
WHERE last_activity > UNIX_TIMESTAMP() - X*60*60*24
Replace X with the number of days.

Also, is it possible to find out how many posts have been made each day?
See this post:

http://xenforo.com/community/thread...out-your-forum-daily-stats.13711/#post-179627