I have a simple database (using MySql) with which I need to generate a report. I have a table that schedule_plan which are submitted by users.
and my table userinfo which contain name ,age dll
So I need a report which displays the days as columns as well as the names from a userinfo table.
Report
+------+--------+--------+--------+-------+
| Name | 1 | 2 | 3 | until day 30/31 |
+------+--------+--------+--------+-------+
| Bob | ON | ON | ON | ... |
| Joe | OFF | ON | OFF | ... |
| Jim | ON | ON | ON | ... |
if absence_code in schedule_plan is null then ON if not null OFF