";
// Fetch all factory records
$strQuery111 = " SELECT * FROM $myTable WHERE Teacher_code='$Teacher_code' GROUP BY Year_std ";
$result111 = $dbObj->execQuery($strQuery111);
//Iterate through each factory
if( $result111 ) {
while( $rs111 = $dbObj->fetchArray($result111) ) {
$Year = $rs111['Year_std'];
$sql3 = " SELECT SUM(Day) AS Day FROM training_tb WHERE Teacher_code='$rs111[Teacher_code]' AND Year_std='$rs111[Year_std]' ";
$result3 = $dbObj->execQuery($sql3);
$rs3 = $dbObj->fetchArray($result3);
$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);
?> |
|