small fix

This commit is contained in:
rsgrinko committed 2022-01-14 23:39:02 +03:00
1 parent 0ec5c9cc9c
commit 6a9581ba69
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -173,7 +173,7 @@ class CIoT {
* @param $deviceId
*/
public static function getSensorAllData($deviceId){
for($i=1; $i<11; $i++) {
for($i=1; $i<5; $i++) {
$res = self::$DB->query('SELECT * FROM sensors WHERE device="'.$deviceId.'" and sensor="ds'.($i).'" ORDER BY id DESC LIMIT 1');
if($res) {
$result['ds'.$i]['sensor'] = $res[0]['sensor'];