";
$strQ = " SELECT * FROM person_type_tb ";
$res = $dbObj->execQuery($strQ);
$c = mysql_num_rows($res);
while( $rs0 = $dbObj->fetchArray($res) ) {
$dc = $rs0['Ptype_code'];
if ($dc != 2 ){
$sql = " SELECT COUNT(Person_type) AS num FROM personal_tb WHERE StatusId='1' AND Person_type=$dc ";
$result = $dbObj->execQuery($sql);
$rs = $dbObj->fetchArray($result);
$dbObj->freeresult($result);
$per = ( $rs['num'] * 100 ) / $total;
$p = number_format($per,2,'.','.');
$strXML .= "";
}
}
//Finally, close element
$strXML .= "";
//Create the chart - Pie 3D Chart with data from strXML
echo renderChart("../charts/Pie3D.swf", "", $strXML, "",700, 375, false, false);
?> |
|