我不想为此图表设置限制。
如何删除它才能工作?
代码:
$sql = "(SELECT (UNIX_TIMESTAMP(timestamp)*1000) AS time ,IFNULL(hodnota,'null')AS temperature
FROM arduino_data ORDER BY timestamp DESC LIMIT 60) ORDER BY time ASC";
$result = $conn->query($sql);
if ($result->num_rows>0){
$count =0;
echo '[';
while($row=$result->fetch_assoc()){
echo '['.$row["time"].',' .$row["temperature"].']';
$count++;
if ($count<"60"){
echo ',';
}
}
echo ']';
}else{
echo "[[],[]]";
}
$conn->close();
要了解的打印屏幕:here
谢谢:),抱歉我的英语不好:/