What I use to get total number of members. Works for me. Posting it here because it seems to be something people really want. Dunno why. I script kiddied the code that Billspaintball used to get thread/post counts, and did a quickie Google search for how to count rows. and mashed them up. /shrugs
Demo: beta.awp-tech.com
Code:
// get total number of members
$getstats_user_count = $db->query_read('SELECT COUNT(*) FROM ' .TABLE_PREFIX . 'user');
while ($forum_user_count = $db->fetch_array($getstats_user_count))
{
$totusers += $forum_user_count['COUNT(*)'];
}
$totusers = vb_number_format($totusers);
I am really NOT good at coding (I know no PHP/mySQL), so use at your own risk. If I made any mistakes, please let me know so I can correct it!
Hakaslak figures usage instructions would be nice:
#
#-----[ OPEN ]------------------------------------------
#
#
#-----[ FIND ]------------------------------------------
#
Code:
$totposts = vb_number_format($totposts);
#
#-----[ AFTER, ADD ]------------------------------------------
#
Code:
// get total number of members
$getstats_user_count = $db->query_read('SELECT COUNT(*) FROM ' .TABLE_PREFIX . 'user');
while ($forum_user_count = $db->fetch_array($getstats_user_count))
{
$totusers += $forum_user_count['COUNT(*)'];
}
$totusers = vb_number_format($totusers);
#
#-----[ FIND ]------------------------------------------
#
Code:
$vbphrase[posts]: $totposts<br />
#
#-----[ AFTER, ADD ]------------------------------------------
#
Code:
$vbphrase[members]: $totusers<br />
All done!