Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Show how many members are in a group?
#1
Not Solved
This user has been denied support. This user has been denied support.
On my site http://Vorkinpride.com, I have a showgroups page http://Vorkinpride.com/showgroups.php how can I make it so it show members. I have seen many forums do this, But none will tell sadly.
If I help please +1 me!

VorkinPride Owner
The all in on forum site


Reply
#2
Not Solved
I guess you'll need a db query for each usergroup, like this (where X is group ID):

$eternalgroup = $db->num_rows($db->simple_select("users", "uid", "usergroup='X'"));
echo intval($eternalgroup);
Greetings Sven (ps: Sorry for my bad english!!)

My plugins - [email protected]
Reply
#3
Not Solved
Oo, Maeko here. c:

$countadmins = $db->write_query( "SELECT COUNT(*) AS totaladmins FROM ".TABLE_PREFIX."users WHERE `usergroup` = 4 " );
$totaladmins = my_number_format($db->fetch_field($countadmins, "totaladmins")); 

Use {$totaladmins} as variable, this will show all admins.
Reply
#4
Not Solved
This user has been denied support. This user has been denied support.
(10-04-2015, 06:24 PM)Sazze Wrote: Oo, Maeko here. c:

$countadmins = $db->write_query( "SELECT COUNT(*) AS totaladmins FROM ".TABLE_PREFIX."users WHERE `usergroup` = 4 " );
$totaladmins = my_number_format($db->fetch_field($countadmins, "totaladmins")); 

Use {$totaladmins} as variable, this will show all admins.

The php just goes on the page also?
If I help please +1 me!

VorkinPride Owner
The all in on forum site


Reply
#5
Not Solved
This user has been denied support. This user has been denied support.
Does the PHP go in the showgroups.php

and the {$totaladmins} go in the template?
If I help please +1 me!

VorkinPride Owner
The all in on forum site


Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)