我在我的图表中使用Highcharts,效果非常好。
但是现在我想要我的mysql结果的价值。我尝试的是这样的:
xAxis: {
dateTimeLabelFormats: {
month: '%b'
}
data: [<?
//verkoopfacturen tot 30 dagem oud
$query = "SELECT SUM(VerkoopfactBedrag) AS bedrag, DATE_FORMAT(VerkoopfactDatum, '%m') AS date
FROM verkoopfacturen WHERE Verkoopfact_UserId = {$_COOKIE['customer_id']} AND VerkoopfactDatum BETWEEN '{$year}-01-01' AND '{$year}-12-30'
GROUP BY MONTH(VerkoopfactDatum)";
$sql = mysql_query("$query");
while ($fill = mysql_fetch_array($sql))
{
$bedrag = $fill['bedrag'];
$date = $fill['date'];
echo '[';
echo $date.',';
echo $bedrag;
echo '],';
}
?>]
现在的问题是我得到小数的月份