我有一個天氣數據庫,每隔70秒就會獲取數據集(取決於天氣站何時傳遞數據)。 我想使用Pchart來繪製它,但我有太多的樣本,所以X軸被搞砸了。 所以我想每5分鐘的數據。 (或每30分鐘) 查詢我目前有是這樣的: SELECT time, temp_out FROM wmr200 WHERE date(time) = curdate()
這得到了樣品過去24個小時,但有太多。
我想根據pchart提供的示例生成圖表。這裏是我的代碼: <?php
/* Include the pData class */
include("pchart/class/pData.class.php");
/* Create the pData object */
$myData = new pData();
/* Connect to the MySQL database