I would like to make it possible for some to store which jobs they are working one.
For example say we have random job numbers from 500 to 1000. One individual may have 15 jobs assigned to himself.
So far I have made a table in Mysql that has the fields employee_id and job_number. Another way I was thinking was to have employee_id and job_numbers (Notice the S on job_numbers). So instead of have multiple entries for each job number have one entry for each employee and in the job _numbers field list all the assigned job numbers via an array?
I also have a PHP file that queries the data base for all possible job numbers and lists them with check boxes.
I can figure out how to make it possible for one to go in and check of all his programs and add then into the DB. Where I have difficulties seeing is once he has assigned his programs I would like to make it possible to re-list all the jobs and have all his jobs already checked and then make it so he can uncheck or check new and old programs. Is it a good idea when they go in and re-edit there programs to delete all of his/her entries and re-insert the new? or is there a way to program in PHP to be smart enough to know if one got unchecked?
So basically here are the questions I have:
What is the best fields for the table in the DB?
How do I list all the job numbers with the a check to all assigned number?
How do I re-modify the DB when one goes back and checks and checks job numbers?
Thanks