fixed minor issues

This commit is contained in:
Dorian Zedler 2019-07-15 21:00:30 +02:00
parent a73b481809
commit b177c2100d
2 changed files with 3 additions and 3 deletions

View file

@ -146,8 +146,8 @@ class BlueWeather
JOIN sensors S ON M.sensorid = S.id JOIN sensors S ON M.sensorid = S.id
JOIN locations L ON S.locationid=L.id JOIN locations L ON S.locationid=L.id
WHERE L.id=$locId AND M.timestamp > " . $range['from'] . WHERE L.id=$locId AND M.timestamp > " . $range['from'] .
"AND M.timestamp < " . $range['to'] . " " AND M.timestamp < " . $range['to'] .
ORDER BY timestamp ASC"; " ORDER BY timestamp ASC";
$result = $this->_con->query($sql); $result = $this->_con->query($sql);

View file

@ -26,7 +26,7 @@ $blueweather = new BlueWeather($config);
if (isset($_GET['locId'])) { if (isset($_GET['locId'])) {
// get data of given location // get data of given location
$data = getLocationData($_GET['locId'], $_GET['range'], $_GET['maxVals']); $data = $blueweather->getLocationData($_GET['locId'], $_GET['range'], $_GET['maxVals']);
} else { } else {
$data = $blueweather->getAllLocations(); $data = $blueweather->getAllLocations();
} }