Hide Non Activated Users From Member List
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #5
RE: Hide Non Activated Users From Member List
Do a select COUNT(*) (also, ordering doesn't make any sense here)

PHP Code:
		$query = $GLOBALS['db']->simple_select('users','COUNT(*) AS num_users','usergroup!=5');
		$activeusercount = $GLOBALS['db']->fetch_field($query, 'num_users');


Note that you may wish to put an index on the usergroup column if you do this, as the query can be slow if there are a lot of users.


My Blog
(This post was last modified: 04-05-2012 04:55 PM by ZiNgA BuRgA.)
04-05-2012 04:54 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Hide Non Activated Users From Member List - ZiNgA BuRgA - 04-05-2012 04:54 PM

 Standard Tools
Forum Jump: