I created a module for rendering overtime. In the module you will select your approving person and it will be maximum of 3 persons.
The scenario is that I will display all approved overtimes if manager1_date is not NULL, manager2_date is not NULL and manager3_date is not NULL. But as i said, it can be only 1,2 or 3 approving person. what if i applied then i have only 2 approving persons, it should be if manager1_date is not NULL and manager2_date is not NULL.
I tried this query:
Select * from table1
where manager1_date is not null
AND (manager2_date is not null or manager3_date is not null)
In PHP, it displays the record but the record has 3rd approving person which is manager3_date is NULL. it should not display the record until the approving persons are filled out.