Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

[SOLVED] combining admin and super admin

how to combine admins and superadmin using this code?

CodeDownload  
$total = dbrows(dbquery("SELECT user_id, user_level FROM ".$db_prefix."users WHERE user_level='102'"));



thanks
you can give admins superadmin rights through the Admin Panel...

If you dont mind me asking why are you trying to combine them and what for ??
got no answer still.. i mean this topic is not solve..
CodeDownload  
$total = dbrows(dbquery("SELECT user_id, user_level FROM ".$db_prefix."users WHERE user_level='102' OR user_level='103'"));

#

CodeDownload  

$total1 = dbcount("(user_id)", DB_USERS, "user_level='103'");

$total2 = dbcount("(user_id)", DB_USERS, "user_level='102'");

$total=$total1+$total2;

echo $total;



this works too right? i tried both! thanks a lot guys...
What is your problem?

Are you going to count how many admins and superadmins there are on your site? Or…?

The code in post #6 aren't good – it uses two dbquerys.
Try this instead:
CodeDownload  
$total = dbcount("(user_id)", DB_USERS, "user_level=>'102'");
echo $total;

my purpose is to add up super admin with admin count..

like: if you have 1 admin and 1 super admin, it should count to 2 administrators!

i want to count admins and super admin for administrators. not separating them..

does post #5 works? im using it on my site - www.callerspring.co.cc
My code in #7 count the numbers of users, where the user is admin or superadmin. :)
let me try your code.. ill report back immediately..
sql syntax error on your code sir!

Quote

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=>'102'' at line 1
Try this instead:

CodeDownload  
$total = dbcount("(user_id)", DB_USERS, "user_level='102' OR user_level='103'");
echo $total;

elactos code works!

thats the same with him.. thanks a lot! btw are you the one sir who visited my site?
you're using the username johnburn? :)
Me?

No.
Thread Information
Author
Replies
15 posts
Views
2672 times
Last Post
Last updated on 11 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Josso, Elactos, HobbyMan, hame, chonghua