From b177c2100d5700880f226f050cbd35e4a4d71940 Mon Sep 17 00:00:00 2001 From: dorian Date: Mon, 15 Jul 2019 21:00:30 +0200 Subject: [PATCH] fixed minor issues --- api/blueweather.php | 4 ++-- api/json.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/blueweather.php b/api/blueweather.php index b7623e8..86b64ca 100644 --- a/api/blueweather.php +++ b/api/blueweather.php @@ -146,8 +146,8 @@ class BlueWeather JOIN sensors S ON M.sensorid = S.id JOIN locations L ON S.locationid=L.id WHERE L.id=$locId AND M.timestamp > " . $range['from'] . - "AND M.timestamp < " . $range['to'] . " - ORDER BY timestamp ASC"; + " AND M.timestamp < " . $range['to'] . + " ORDER BY timestamp ASC"; $result = $this->_con->query($sql); diff --git a/api/json.php b/api/json.php index f58c536..da76b21 100644 --- a/api/json.php +++ b/api/json.php @@ -26,7 +26,7 @@ $blueweather = new BlueWeather($config); if (isset($_GET['locId'])) { // get data of given location - $data = getLocationData($_GET['locId'], $_GET['range'], $_GET['maxVals']); + $data = $blueweather->getLocationData($_GET['locId'], $_GET['range'], $_GET['maxVals']); } else { $data = $blueweather->getAllLocations(); }