Code fixes for date time change

This commit is contained in:
gamonoid
2017-09-03 21:35:00 +02:00
parent 0e2c5daacf
commit 71dbfe430e
5 changed files with 7 additions and 7 deletions

View File

@@ -52,10 +52,10 @@ FROM Employees e";
if (empty($request['department']) || $request['department'] == "NULL") {
$params = array();
$query = "where ((termination_date = '0001-01-01 00:00:00' or termination_date = '0000-00-00 00:00:00') and joined_date < NOW()) or (termination_date > NOW() and joined_date < NOW())";
$query = "where ((termination_date is NULL or termination_date = '0001-01-01 00:00:00' or termination_date = '0000-00-00 00:00:00') and joined_date < NOW()) or (termination_date > NOW() and joined_date < NOW())";
} else {
$depts = $this->getChildCompanyStuctures($request['department']);
$query = "where department in (".implode(",", $depts).") and (((termination_date = '0001-01-01 00:00:00' or termination_date = '0000-00-00 00:00:00') and joined_date < NOW()) or (termination_date > NOW() and joined_date < NOW()))";
$query = "where department in (".implode(",", $depts).") and (((termination_date is NULL or termination_date = '0001-01-01 00:00:00' or termination_date = '0000-00-00 00:00:00') and joined_date < NOW()) or (termination_date > NOW() and joined_date < NOW()))";
}