Bladeren bron

no message

DESKTOP-9JTA2JJ\HP 5 jaren geleden
bovenliggende
commit
b08a3b21ed
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      api/application/models/Lamp_model.php

+ 2 - 2
api/application/models/Lamp_model.php

@@ -866,12 +866,12 @@ class Lamp_model extends Base_model {
 		}
 
 		if ($nw_status !== false) {
-			$andCondition = 'AND N.status = '.$nw_status;
+			$andCondition = 'AND L.netstatus = '.$nw_status;
 		} else {
 			$andCondition = '';
 		}
 
-		$sql = "SELECT COUNT(L.id) AS num FROM lampinfo as L left join network as N on L.networkid = N.id WHERE {$condition} {$andCondition}";
+		$sql = "SELECT COUNT(L.id) AS num FROM lampinfo as L WHERE {$condition} {$andCondition}";
 		$query = $this->db->query($sql);
 		$arrRet = $query->row_array();
 		return $arrRet;