I am trying to create a dynamic table where an employees hours are posted...
The employees names are in another table so all I would need is the hours to the right of them...
I have the hours in a table in my mysql database setup as so..
emp_id | s_id | work | timestart | timeend | medleave | request | scrubflrs | temps | train | earlylater
emp_id = the employee id linking to the employees id of said employee in the users table
s_id = the store number of said employee
work = if they work that day or not. true of false 1 being true, 0 being false
timestart = in datetime format of the time they start working
timeend = see above just ending time
medleave = to show if they are on medical leave or not
request = to show if they requested the day off
scrubflrs = if they need to scrub the floors that night
temps = if they need to do temps or not
train = if they are training
earlylater = if they can leave early or later than when they are scheduled.
I'm trying to make it so that that data will display in a row and will create other rows for however many employees there are. One column for each day of the week and will display if they are off work too, all sorted by the emp_id.
I have been looking all over for solutions and I've seen some stuff, but nothing really that would help me in the way I'm looking for it to be...
here is essentially what I have thus far...
I also added an image of what the layout of this table would be...
I know how I would do all the information on the backend of it. Just no idea how to display it on the frontend of the site. Any help would be greatly appreciated!