|
@@ -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;
|