Jump to content

Recommended Posts

hi
i was wondering if anyone can help me with a small pice of coding i have in my website?what im trying to do is get the total number of males signed up to my website and the same for females also.ok here is the code i have to show how many members i have signed up witch would be under (member)and for there gender its under member then (gender)is there anyway this can be done?thanks...


$dbu->query('SELECT COUNT(*) AS rowcount FROM member');
$dbu->move_next();
$ft->assign('MEMBER', $dbu->f('rowcount'));
Link to comment
https://forums.phpfreaks.com/topic/7505-malefemale/
Share on other sites

[code]$res = mysql_query ("SELECT gender, COUNT(*)
              FROM members
              GROUP BY gender");

while (list ($gender, $total) = mysql_fetch_row($res)) {

       echo "$gender : $total <br>";
}[/code]
Link to comment
https://forums.phpfreaks.com/topic/7505-malefemale/#findComment-27343
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.