Added new premstaetten import 2023-05-26
This commit is contained in:
@@ -137,9 +137,13 @@ class ADBWohneinheitModel {
|
||||
$where = "1=1 ";
|
||||
|
||||
if(array_key_exists("extref", $filter)) {
|
||||
$extref = FronkDB::singleton()->escape($filter['extref']);
|
||||
if($extref) {
|
||||
$where .= " AND Wohneinheit.`extref` = '$extref'";
|
||||
if($filter['extref'] === null || $filter['extref'] === false) {
|
||||
$where .= " AND (Wohneinheit.`extref` IS NULL OR Wohneinheit.`extref` = '')";
|
||||
} else {
|
||||
$extref = FronkDB::singleton()->escape($filter['extref']);
|
||||
if($extref) {
|
||||
$where .= " AND Wohneinheit.`extref` = '$extref'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +167,9 @@ class ADBWohneinheitModel {
|
||||
|
||||
if(array_key_exists("num", $filter)) {
|
||||
$num = $filter['num'];
|
||||
if(is_numeric($num)) {
|
||||
if($num === false || $num === null) {
|
||||
$where .= " AND (Wohneinheit.num IS NULL OR Wohneinheit.num = 0)";
|
||||
} elseif(is_numeric($num)) {
|
||||
$where .= " AND Wohneinheit.num=$num";
|
||||
} elseif(is_array($num) && count($num)) {
|
||||
$where .= " AND Wohneinheit.num IN (". implode(",", $num).")";
|
||||
@@ -205,12 +211,12 @@ class ADBWohneinheitModel {
|
||||
if(array_key_exists("zusatz", $filter)) {
|
||||
$zusatz = FronkDB::singleton()->escape($filter['zusatz']);
|
||||
if(strlen($zusatz)) {
|
||||
$where .= " AND Wohneinheit.`zusatz` = '$zusatz'";
|
||||
$where .= " AND Wohneinheit.`zusatz` LIKE '$zusatz'";
|
||||
} else {
|
||||
$where .= " AND (Wohneinheit.`zusatz` IS NULL OR Wohneinheit.`zusatz` = '')";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(array_key_exists("nutzung", $filter)) {
|
||||
$nutzung = FronkDB::singleton()->escape($filter['nutzung']);
|
||||
if(strlen($nutzung)) {
|
||||
|
||||
Reference in New Issue
Block a user