";
// Fetch all factory records
$strQuery = " SELECT * FROM $myTable GROUP BY slAcY ";
$result1 = mysql_query($strQuery);
//Iterate through each factory
if( $result1 ) {
while( $rs1 = mysql_fetch_array($result1) ) {
$slAcY = $rs1['slAcY'];
$strQuery2 = " SELECT * FROM $myTable WHERE slAcY ='$rs1[slAcY]' ";
$result2 = mysql_query($strQuery2);
$numAmt2 = mysql_num_rows($result2);
mysql_free_result($result2);
$strXML .= "";
// $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/Column3D.swf", "", $strXML, "", 750, 375, false, false);
?> |