";
// Fetch all factory records
$strQuery = " SELECT * FROM $myTable2 WHERE Faculty_code='$Faculty_code' GROUP BY Budget_Year ";
$result1 = mysql_query($strQuery);
//Iterate through each factory
if ($result1) {
while( $rs1 = mysql_fetch_array($result1) ) {
$strQuery = " SELECT * FROM project_type_tb WHERE Budget_Year='$rs1[Budget_Year]' AND Faculty_code='$Faculty_code' ";
$result2 = mysql_query($strQuery);
$numAmt = mysql_num_rows($result2);
$strXML .= "";
} # while
} # if
//Finally, close element
$strXML .= "";
//Create the chart - Pie 3D Chart with data from strXML
echo renderChart("../charts/Column3D.swf", "", $strXML, "", 750, 375, false, false);
?> |