I will do my best to answer the questions and give a better understanding of what I want to accomplish. If you need more clarification please let me know.
In the end I want a table to be populated automatically based on the current date with all four departments' on call person for that given day. The week starts on Monday and I know how to get the week of the year based on the given day of the year. I have a javascript calender on the webpage right now that auto populates with the current date. I also want a user to be able to select any day of the current year and the table will repopulate with the on call information for that day/week. I want a user that does not know anything about programming to be able to add users, delete users and make temporary changes to the on call schedule when someone takes a vacation and the normal rotation is changed, all without effecting future or past rotations. So if John from group A gets fired during the 18th week of the year someone could remove him by filling out a form. All queries before week 18 would show John as on call if that was his week but all queries after week 18 would be based on the current amount of users in the group.
Ultimately in the end I want to create a form that will allow a user to recreate the database if the on call rotation policy changes. But that will be a final stage, a year from now and password protected. I only say this in case that changes the design of the database somehow.
I am trying to think forward to when I am not in this department and/or company. I don't want all this work to go to waste because no one knows how to update or change the database.
Each department has it's own group. Each person is in one group only.
Yes a real date (meaning a day)
If group A has members Bob, Joe, Mary, Frank and John they will always be on call in the same order. Bob then Joe then Mary then Frank then John then Bob again....
This is true for three of the four groups. The fourth group has nine employee's and the rotation repeats every 18 weeks. so using numbers in place of the name for this example:
1,2,3,4,5,6,7,8,9,5,6,2,3,4,1,9,8,7,1,2,3,4,5,6,7,8,9,5,6,2,3,4,1,9,8,7,1,2,3,4,5,6,7,8,9,5,6,2,3,4,1,9 would be the whole rotation for the year for this group.
I am unfamiliar with a cron could you please elaborate?
This will be a dynamic web page. So today someone could log onto the web page and want to know who was on call Jan 18, 2012. If someone was added to the group since then how would the query know not to include them when calculating the on call person?
So you would suggest that the schedule table holds 208 entries, four entries for each week of the year. I had not thought of that.