I’m working on a scheduler that placing employees into the schedule based on a seniority or priority number.
This is what I’m looking for:
Says we have 100 employees, a new hire comes on and becomes 101 not touching anyone else’s numbers. Then lets say an employee quits opening number 67. I then need everyone from 68 and up to move into position down one.
68 becomes 67 filling that seniority number from the employee that quit
69 becomes 68
70 becomes 69
And so one leaving you with that new employee number 101 is now 100. I also need to be able to change a seniority level. Say someone screws up but doesn’t need to be fired, just change they’re seniority level so they don’t get as much work, make sence?
I tried using my auto_incremented primary key and that isn’t working, I get an error “Duplicate entry…” when I try to change a seniority level.
Any help would be great, thanks!
-Cy