Hello. I am working on a project that could best be described as a "time card" system. It is so employees can clock in/out and submit their time cards after a couple of weeks. It is also going to have some admin features like manage employees, edit cards, view unsent time cards, view past time cards, mark time cards as paid, and some other little things.
I am running into a problem trying to get my PHP scripts to work correctly with my database design. I am wondering if there is a better way to do things.
Right now I have 2 tables. 1 for login info, and 1 for time cards. There will be about 20 employees. Do you think it would be better to have a table for each one?
table1
unique id
what time card they are on (will increase when they "submit" their card)
login name
password
what position they hold at the company
if they are an admin or not
table 2
unique id
employee id
time card id
punch in
punch out
paid vacation time (admin will set this manually)
any expenses they need to add to the card
any drive time they had
if the card was submitted
if the card was paid
The problem I am having is that there will end up being 20 entries per "time card id" and I cant seem to get my PHP scripts to separate them by "employee id".
How would you go about doing this type of project?
I would really appreciate any help you can offer. I can supply more details if it would help.