I am about to start working on similar project like the one you have, Freelance and I wonder if you have solved/finished your project.
If not maybe someone in this forum can give us some enlightment?
I am assigned to create an employee availability database so the employers can track whether or not the employee is in.
What I have in mind is a database with one table with this info:
EMP_AVAIL_TABLE
EmpID or EmpName
LeaveInfo --> Vacation, Sick or Others
StartDate
EndDate
where those information will be entered by Admin via Admin page with PHP form.
And I want it to be displayed like this: (01, 02, 03 ... are the dates of month)
+-----------+----+----+----+----+----+
|EmpName | 01 | 02 | 03 | 04 | .... |
+-----------+----+----+----+----+----+
| EmpA | V | V | V | V | |
+-----------+----+----+----+----+----+
| EmpB | S | S | S | | |
+-----------+----+----+----+----+----+
| EmpC | | | V | | |
+-----------+----+----+----+----+----+
I know how to create a calendar.
Now, since I only have StartDate and EndDate, how can I 'explode' the StartDate and EndDate into single dates between those two dates so that I can insert LeaveInfo into each of those related dates in my calendar? I believe "BETWEEN" in MySQL is not what I want.
What I have in mind to do this is using either temporary table or an array that will store the dates between after some 'dates-exploding' process. But, I am not pretty sure about it. There must be a better solution for this.
Well, I will really appreciate any info that will lead to the solution of this.