MYSQL でエラーが発生します
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
誰かが私にこのエラーが何であるかを説明できますか? ありがとう。
PHP コード:
<?php
$link = connectToDB();
$strXML = "<chart caption='Factory Output report' subCaption='By Quantity' pieSliceDepth='30' showBorder='1' formatNumberScale='0' numberSuffix=' Units'>";
$result = mysqli_query($link, "SELECT DISTINCT PROFILE FROM tbljocreator GROUP BY PROFILE");
$show = mysqli_fetch_array($result);
if($result) {
while ($ors = mysqli_fetch_array($result)) {
$strQuery = "select PROFILE, sum(MT) as totalLM from tbljocreator where PROFILE =" .$ors['PROFILE'];
$result2 = mysqli_query($link, $strQuery) or die(mysqli_error($link));
$getresult2 = mysqli_fetch_array($result2);
$strXML .= "<set label='" . $ors['profile'] . "' value ='" . $getresult2['totalLM'] . "' />";
mysqli_free_result($result2);
}
}
mysqli_close($link);
$strXML .= "</chart>";
echo renderChart("FusionCharts/Column3D.swf", "", $strXML, "JoCreator", 450, 300, false, true);
?>
私のために明確に説明してください。