Count Male/Female Specific Usergroup
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #5
RE: Count Male/Female Specific Usergroup
If there are more than one conditions, you should use AND or OR, not ,

For example (based on your query):

PHP Code:
// Usergroup Number Counts
$num_male = $db->fetch_field($db->simple_select("userfields", "COUNT(ufid) as count", "usergroup IN ('4') AND fid3='Male'"), "count");
$num_female = $db->fetch_field($db->simple_select("userfields", "COUNT(ufid) as count", "usergroup IN ('4') AND fid3='Female'"), "count");


12-16-2017 10:13 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Count Male/Female Specific Usergroup - RateU - 12-16-2017 10:13 PM

 Standard Tools
Forum Jump: