Spinball
09-08-2004, 10:00 PM
Don't know where to post these or even if they are welcome but hopefully someone will find them useful or tell me where to re-post them.
Got a couple of MySQL scripts to report the number of posts in the last 24 hours:
Total number of posts in the last 24 hours
SELECT COUNT(postid) from post WHERE post.dateline >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL 24 HOUR));
Total number of posts for each active, visible forum. Doesn't include password protected forums unless you edit to specify passwords.
SELECT forum.title,COUNT(postid) from post,thread,forum WHERE post.threadid = thread.threadid AND thread.forumid = forum.forumid AND forum.displayorder > 0 AND forum.parentid > -1 AND (forum.password='' or forum.password in ('password1','password2')) AND post.dateline >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL 24 HOUR)) GROUP BY forum.forumid ORDER BY forum.title LIMIT 1000;
Got a couple of MySQL scripts to report the number of posts in the last 24 hours:
Total number of posts in the last 24 hours
SELECT COUNT(postid) from post WHERE post.dateline >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL 24 HOUR));
Total number of posts for each active, visible forum. Doesn't include password protected forums unless you edit to specify passwords.
SELECT forum.title,COUNT(postid) from post,thread,forum WHERE post.threadid = thread.threadid AND thread.forumid = forum.forumid AND forum.displayorder > 0 AND forum.parentid > -1 AND (forum.password='' or forum.password in ('password1','password2')) AND post.dateline >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL 24 HOUR)) GROUP BY forum.forumid ORDER BY forum.title LIMIT 1000;