zipp Posted January 31, 2009 Share Posted January 31, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/143238-database-structure-help/ Share on other sites More sharing options...
FezEvils Posted January 31, 2009 Share Posted January 31, 2009 i think it's ok. just make sure u have 1 table for employees which contain all private data about employee and 1 table for only store time-card, but u must add employee_id into both file, then you have a relation between two tables Quote Link to comment https://forums.phpfreaks.com/topic/143238-database-structure-help/#findComment-751486 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.