";
// Fetch all factory records
$strQuery111 = " SELECT * FROM $myTable GROUP BY Year_std ";
$result111 = $dbObj->execQuery($strQuery111);
//Iterate through each factory
if( $result111 ) {
while( $rs111 = $dbObj->fetchArray($result111) ) {
$Year = $rs111['Year_std'];
// $strQuery222 = " SELECT * FROM $myTable WHERE Year_std='$rs111[Year_std]' ";
// $result222 = $dbObj->execQuery($strQuery222);
// $numAmt222 = $dbObj->_numrows;
//$dbObj->freeresult($result222);
$strquery1 = " SELECT SUM(Budget_use ) AS Sum FROM training_tb WHERE Year_std='$rs111[Year_std]' ";
$result1 = $dbObj->execQuery($strquery1);
$rs1 = $dbObj->fetchArray($result1);
$dbObj->freeresult($rs1);
// echo "". number_format($rs6['Sum'],2,'.',',') ."";
$strXML .= "";
// $strXML .= "";
} # while
} # if
$dbObj->freeresult($result111);
//Finally, close element
$strXML .= "";
//Create the chart - Pie 3D or Column3D Chart with data from strXML
echo renderChart("./charts/Pie3D.swf", "", $strXML, "", 600, 375, false, false);
?> |
|