a lot of bugs corrected\nrdc_wc_eclairage
This commit is contained in:
@@ -81,7 +81,7 @@ class db extends mysqli
|
||||
|
||||
function moyenne($deviceObject, $property, $time)
|
||||
{
|
||||
$query = "SELECT AVG(value) WHERE device='" . $deviceObject->ieeeAddress . "' AND property='" . $property . "' AND TIMEDIFF(NOW(), 'date') < " . $time;
|
||||
$query = "SELECT AVG(value) FROM logs WHERE device='" . $deviceObject->ieeeAddress . "' AND property='" . $property . "' AND TIMEDIFF(NOW(), 'date') < " . $time;
|
||||
if(!$this->result = $this->query($query))
|
||||
{
|
||||
logger(ERROR, _("mysql query errror: ") . $this->error, __FILE__ . ":" . __LINE__);
|
||||
|
Reference in New Issue
Block a user