Kalender ADDRESS MODEL

* Update des Address Models Hab einen Searchkey hinzugefügt
This commit is contained in:
Daniel Spitzer
2024-11-10 21:47:44 +01:00
parent 612a7fbb67
commit 9633d7e4ec

View File

@@ -225,7 +225,6 @@ class AddressModel {
$sql .= " LIMIT " . $limit['count'];
}
}
mfLoghandler::singleton()->debug($sql);
$res = $db->query($sql);
@@ -484,7 +483,16 @@ class AddressModel {
$where .= " " . $filter['add-where'];
}
//var_dump($filter, $where);exit;
if (array_key_exists("Controller!", $filter)) {
$termstring = trim($filter['search_term!']);
$termExplode = explode(" ", $termstring);
foreach ($termExplode as $term) {
$wherestring .= " AND (`customer_number` LIKE '%" . $term . "%' OR `company` LIKE '%" . $term . "%' OR `firstname` LIKE '%" . $term . "%' OR `lastname` LIKE '%" . $term . "%' OR `street` LIKE '%" . $term . "%' OR `zip` LIKE '%" . $term . "%' OR `city` LIKE '%" . $term . "%') ";
}
$where .= " AND customer_number > 0 $wherestring";
}
// var_dump($filter, $where);exit;
return $where;
}