Update ConstructionConsent.php
This commit is contained in:
@@ -409,6 +409,7 @@ class ConstructionConsent extends mfBaseModel {
|
||||
GROUP BY ConstructionConsent.id
|
||||
$having
|
||||
ORDER BY $order";
|
||||
// die($sql);
|
||||
|
||||
if(is_array($limit) && count($limit)) {
|
||||
if(is_numeric($limit['start']) && is_numeric($limit['count'])) {
|
||||
@@ -580,10 +581,15 @@ class ConstructionConsent extends mfBaseModel {
|
||||
}
|
||||
}
|
||||
|
||||
if (array_key_exists("cwo", $filter)) {
|
||||
$where .= " AND EXISTS
|
||||
(SELECT 1 FROM ConstructionConsentOwner co WHERE co.constructionconsent_id = ConstructionConsent.id AND
|
||||
LOWER(CONCAT(co.FIRST_NAME, ' ', co.LAST_NAME)) LIKE LOWER('%".$filter['cwo']."%')";
|
||||
if (array_key_exists("cwo", $filter) && !empty($filter['cwo'])) {
|
||||
$where .= "
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM ConstructionConsentOwner co
|
||||
WHERE co.constructionconsent_id = ConstructionConsent.id
|
||||
AND LOWER(CONCAT(co.firstname, ' ', co.lastname)) LIKE LOWER('%".$filter['cwo']."%')
|
||||
)
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user