fullyloaded Posted April 15, 2006 Share Posted April 15, 2006 hii 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')); Quote Link to comment https://forums.phpfreaks.com/topic/7505-malefemale/ Share on other sites More sharing options...
Barand Posted April 15, 2006 Share Posted April 15, 2006 [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] Quote Link to comment https://forums.phpfreaks.com/topic/7505-malefemale/#findComment-27343 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.