Re: Time keeping in DB
| From: | Wolf | Date: | Wed, 05 Aug 2009 19:37:59 +0000 |
| Subject: | Re: Time keeping in DB | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296344@lists.php.net to get a copy of this message | ||
---- Shawn McKenzie <nospam@mckenzies.net> wrote:
> So, obviously not PHP related, but I'm looking for thoughts on the best
> way to record time sheets in a DB. A time sheet for hours worked per
> day, not like a time clock where you start and stop.
>
> The two possibilities that I have thought of are (these are simplistic,
> of course I'll be storing references to the user, the project code etc.):
>
> 1. One record for each 7 day week (year, week_num, d1, d2, d3, d4, d5,
> d6, d7) where the dX field holds the hours worked
> 2. One record for each day (date, hours)
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com
Depends on what you are looking to do..
Are you also needing to keep whether or not a specific project?
If it is regular time/Overtime?
It may be easier to set the database up: user,week,day,project,hours,type
Then you can query the info/user off that, it should allow you to expand as needed.
HTH,
Wolf