i have a works to create table report like in attached image. 90ef46840e7046051c341009f30ee8ca
i don't know how to arrange the days and grouping as Time, thank you for help...

Member Avatar

diafol

The MySQL table should be as simple as possible, regardless of the output that is required - for example, this could be created with just 4 fields and one or more related tables for people and maybe timeslots:

schedule_id (PK)
date (or day - depending on your implementation)
timeslot (possibly an FK)
person_id (FK)

You don't say whether the schedule is the same for every week, where you'd use Day as the second field, or whether this is entered in advance and changes from week to week, in which case you'd use Date. Using Day is probably not the way to go as you'd lose history by overwriting.

The production of the html could be quite tricky, depending on whether you have different number of people for each timeslot and each day. In that case you'd need to prepare your data with rowspans. Please provide more info.