PDA

View Full Version : i need a little help


squawell
12-06-2001, 03:23 PM
i made this code


$admingroup=$DB_site->query_first('SELECT count(*) AS users FROM usergroup WHERE usergroupid=6');
$vbbadmin=number_format($admingroup['users']);
$supermodgroup=$DB_site->query_first('SELECT count(*) AS users FROM usergroup WHERE usergroupid=5');
$vbbsupermod=number_format($supermodgroup['users']);
$modgroup=$DB_site->query_first('SELECT count(*) AS users FROM usergroup WHERE usergroupid=7');
$vbbmod=number_format($modgroup['users']);
$membergroup=$DB_site->query_first('SELECT count(*) AS users FROM usergroup WHERE usergroupid=2');
$vbbmember=number_format($membergroup['users']);

i want it show up each usergroup's member so i made this

but it always show up like below:

admin:1 supermod:1 mod:1 member:1

why?? who know which part is wrong??

Admin
12-06-2001, 03:37 PM
Note my changes:
$admingroup=$DB_site->query_first('SELECT count(*) AS users FROM user WHERE usergroupid=6');
$vbbadmin=number_format($admingroup['users']);
$supermodgroup=$DB_site->query_first('SELECT count(*) AS users FROM user WHERE usergroupid=5');
$vbbsupermod=number_format($supermodgroup['users']);
$modgroup=$DB_site->query_first('SELECT count(*) AS users FROM user WHERE usergroupid=7');
$vbbmod=number_format($modgroup['users']);
$membergroup=$DB_site->query_first('SELECT count(*) AS users FROM user WHERE usergroupid=2');
$vbbmember=number_format($membergroup['users']);

Reason:
We don't want to count the number of usergroups who are admins, but the number of users who are admins. :)

squawell
12-06-2001, 03:59 PM
thankz~~ FireFly!!

it work now~~~