fixed date filter issues
This commit is contained in:
@@ -45,12 +45,15 @@ class WorkorderDashboardController extends TTCrud
|
||||
$userAddressId = intval($this->user->address_id);
|
||||
$sql = "SELECT * FROM thetool.WorkorderCompany
|
||||
WHERE visibleForAddressId IS NULL
|
||||
OR FIND_IN_SET('$userAddressId', visibleForAddressId) > 0
|
||||
OR JSON_CONTAINS(visibleForAddressId, '$userAddressId')
|
||||
ORDER BY name ASC";
|
||||
$result = $db->query($sql);
|
||||
$companies = [];
|
||||
while ($row = $result->fetch_object('WorkorderCompanyModel')) {
|
||||
$companies[] = $row;
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$company = new WorkorderCompanyModel();
|
||||
$company->id = (int)$row['id'];
|
||||
$company->name = $row['name'];
|
||||
$companies[] = $company;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user