get my_networks from parent address if exists
This commit is contained in:
@@ -93,7 +93,7 @@ class BuildingModel {
|
||||
$res = $db->query($sql);
|
||||
if($db->num_rows($res)) {
|
||||
while($data = $db->fetch_object($res)) {
|
||||
$items[] = new Address($data);
|
||||
$items[] = new Building($data);
|
||||
}
|
||||
}
|
||||
return $items;
|
||||
@@ -102,9 +102,14 @@ class BuildingModel {
|
||||
private function getSqlFilter($filter) {
|
||||
$where = "1=1 ";
|
||||
|
||||
/*
|
||||
* Address Type
|
||||
*/
|
||||
|
||||
if(array_key_exists("network_id", $filter)) {
|
||||
$network_id = $filter['network_id'];
|
||||
if(is_numeric($network_id)) {
|
||||
$where .= " AND Building.network_id=$network_id";
|
||||
}
|
||||
}
|
||||
|
||||
if(is_array($filter['type']) && count($filter['type'])) {
|
||||
$ot = $filter['type'];
|
||||
$in = [];
|
||||
|
||||
Reference in New Issue
Block a user