This topic is locked

Tallying for charting?

11/9/2007 4:34:46 PM
PHPRunner General questions
C
chaz author

I have a table
Name Sex

Jane 1

paul 0

peter 0
where male=0 and female=1
how do i tally up all the males and females and present as a chart thanks

Alexey admin 11/12/2007

Hi,
try using this SQL query for the chart:

select sex,count(*) as cnt from Table group by sex