Jump to content

Archived

This topic is now archived and is closed to further replies.

fullyloaded

male/female

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'));

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

×

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.