";
// Fetch all factory records
$strQuery = " SELECT * FROM $myTable GROUP BY acadYear ";
$result1 = mysql_query($strQuery);
//Iterate through each factory
if( $result1 ) {
while( $rs1 = mysql_fetch_array($result1) ) {
$admitAcadYear = $rs1['acadYear'];
$strQuery2 = " SELECT * FROM $myTable WHERE acadYear='$acadYear' ' ";
$result2 = mysql_query($strQuery2);
$numAmt2 = mysql_num_rows($result2);
mysql_free_result($result2);
$strQuery3 = " SELECT * FROM $myTable WHERE acadYear='$acadYear' ";
$result3 = mysql_query($strQuery3);
$numAmt3 = mysql_num_rows($result3);
mysql_free_result($result3);
$strXML .= "";
} # while
} # if
mysql_free_result($result1);
//Finally, close element
$strXML .= "";
//Create the chart - Pie 3D or Column3D Chart with data from strXML
echo renderChart("./charts/Pie3D.swf", "", $strXML, "", 550, 300, false, false);
?> |