View Full Version : show weekly and monthly new member totals
How would I show the weekly and monthly new member totals on my stats page? I have already figured out how to show them daily but not weekly or monthly.
I would appreciate any help!!
Thanks,
Odil
Someone has to know...
Odil
Logician
09-01-2002, 10:32 AM
$weekly = mktime (date("H"), date("i"), date("s"), date("m"), date("d")-7, date("Y"));
$monthly = mktime (date("H"), date("i"), date("s"), date("m")-1, date("d"), date("Y"));
$new_userW=$DB_site->query_first("SELECT count(*) as count FROM user WHERE joindate>$weekly");
$weeklyuser=$new_userW['count'];
$new_userM=$DB_site->query_first("SELECT count(*) as count FROM user WHERE joindate>$monthly");
$monthlyuser=$new_userM['count'];
Now use variables $monthlyuser and $weeklyuser in the relevant template or your code..
Originally posted by Logician
$weekly = mktime (date("H"), date("i"), date("s"), date("m"), date("d")-7, date("Y"));
$monthly = mktime (date("H"), date("i"), date("s"), date("m")-1, date("d"), date("Y"));
$new_userW=$DB_site->query_first("SELECT count(*) as count FROM user WHERE joindate>$weekly");
$weeklyuser=$new_userW['count'];
$new_userM=$DB_site->query_first("SELECT count(*) as count FROM user WHERE joindate>$monthly");
$monthlyuser=$new_userM['count'];
Now use variables $monthlyuser and $weeklyuser in the relevant template or your code..
Excellent thank you! I was looking at the stats.php in the admin directory to see if I could figure the code out but I'm not that good at it yet. Thanks again!
Odil
DudeSicko
09-04-2002, 09:38 AM
Where exactley do you put this in ?
Wich file ?
Logician
09-04-2002, 09:48 AM
Where exactley do you put this in ?
depends..
He was trying to integrate it to his existing stats file, so he put it there.
If you want to make it displayed in say main forum page, then you would put in index.php... For forums page it's forumdisplay.php..
Buttom line: it depends..
Link14716
09-04-2002, 11:55 AM
Or, if you don't know where to put it, go to your admin CP, stats, and then......
Start --> Programs --> Accessories --> Calculator
:D
DudeSicko
09-04-2002, 01:01 PM
Thx il try this out.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.