i want query a single table to show the % for Axis y and fileter name as Axis X. I try to run this php, it display a wrong sql query.
Quote
sFILTER nPERCENTAGE
a 30
b 10
c 20
d 40
Quote
$link = connectToDB();
$strXML = "
$strQuery = "select nPERCENTAGE from tblstats";
$result = mysql_query($strQuery) or die(mysql_error());
if ($result) {
while($ors = mysql_fetch_array($result)) {
$pri_ = $ors['sFILTER'];
$os = $ors['nPERCENTAGE'];
$strXML .= "
mysql_free_result($result);
}
}
mysql_close($link);
$strXML .= "
echo renderChart("../FusionCharts/Charts/FCF_Column3D.swf", "", $strXML, "FactorySum", 600, 300);
?>
Please help me to find out my sql query problems.
Thanks
faye

Back to top
MultiQuote