Jump to content

Database Structure Help


zipp

Recommended Posts

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 seperate 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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.