banner

Declaration Statistics
 
\n"; } break; case "sex": // Get Sex statistics $sql = "SELECT sex,count(*) as num FROM gem_declaration d WHERE 1 group by sex order by num desc"; $res = mysql_query($sql,$conn); $head1 = "Statistics by Gender"; while(list($sex,$num)=mysql_fetch_array($res)) { $percent = number_format(($num/$totalSignatures)*100,2); $width = round($percent); $sex=="M"?$sex="Masculine":$sex="Feminine"; $resultRows .= "\n"; } break; case "job": // Get Job statistics $sql = "SELECT j.JOB as job,count(*) as num FROM gem_declaration d, gem_jobs j WHERE d.job=j.VALUE and j.LANG='en' group by j.JOB order by num desc"; $res = mysql_query($sql,$conn); $head1 = "Statistics by Type of Job"; while(list($job,$num)=mysql_fetch_array($res)) { $percent = number_format(($num/$totalSignatures)*100,2); $width = round($percent); $resultRows .= "\n"; } break; case "org": // Get Organization statistics $sql = "SELECT o.ORG as org,count(*) as num FROM gem_declaration d, gem_organizations o WHERE d.organization=o.VALUE and o.LANG='en' group by o.ORG order by num desc"; $res = mysql_query($sql,$conn); $head1 = "Statistics by Type of Organization"; while(list($org,$num)=mysql_fetch_array($res)) { $percent = number_format(($num/$totalSignatures)*100,2); $width = round($percent); $resultRows .= "\n"; } break; case "educ": // Get Education statistics $sql = "SELECT e.EDUC as educ,count(*) as num FROM gem_declaration d, gem_education e WHERE d.education=e.VALUE and e.LANG='en' group by e.EDUC order by num desc"; $res = mysql_query($sql,$conn); $head1 = "Statistics by Education"; while(list($educ,$num)=mysql_fetch_array($res)) { $percent = number_format(($num/$totalSignatures)*100,2); $width = round($percent); $resultRows .= "\n"; } break; case "nation": // Get Top 10 Country statistics $sql = "SELECT c.NATION as nation,count(*) as num FROM gem_declaration d, gem_countries c WHERE d.country=c.VALUE and c.LANG='en' group by c.NATION order by num desc LIMIT 0,10"; $res = mysql_query($sql,$conn); $head1 = "Statistics by Country (top 10)"; while(list($country,$num)=mysql_fetch_array($res)) { $percent = number_format(($num/$totalSignatures)*100,2); $width = round($percent); $resultRows .= "\n"; } break; } ?>

   $age\"* $percent %
   $sex\"* $percent %
   $job\"* $percent %
   $org\"* $percent %
   $educ\"* $percent %
   $country\"* $percent %
 
 

 

 

 

 

footerok