I setup an absentee page that displays all the users that are out. I setup a query to pull all the users gone for todays date. You can also select 7 and 30 days. The issue I am running into is if a user took off from 09/06 and returns on 09/15. The query would only show him being gone on 09/06. The next day if you look at the report it will not display them.
Here is the query. I know I have to do something with the return date field but having issues getting it working.
SELECT id, fullname, department, firstdate, returndate, comment from timeofflog
firstdate BETWEEN DATE_ADD(NOW(), INTERVAL -1 DAY) AND DATE_ADD(NOW(), INTERVAL $day_sel DAY)
and status = 'Approved' and deleted = 'no'
order by department, fullname