RE: Timetables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Collyer <mailto:richard@xxxxxxxxxxxxxx>
    on Monday, April 25, 2005 3:15 PM said:

> My idea of doing this was to have a database with each record being a
> day for a particular employee. Recording ID, Start Time, Finish Time
> in TimeStamp.

You need to tie those records to the employee records. You need a
foreign key in there somewhere. i.e. employee_id.

Also, by "day" you don't mean Monday, Tuesday, Wednesday, etc. right?
What I'm getting at is, a record should be created only when an employee
"logs in" and not for each day of the week. Don't create empty records
for each day the employee does not work.

> So I could then do a search for the number of employees whose shift
> start or finished in that particular day. If there is a start and a
> finish left add up the hours, if only a start do start -> midnight and
> if only a finish do midnight -> finish.
> 
> Is this a sensible way to do it? Or can anyone suggest a better tried
> and tested way.

Are you trying to determine how much an employee has worked in a certain
period of time? i.e. Week/month/year?

What triggers the creation and modification of each record? Is the
employee required to clock in and clock out manually or is this all
predetermined?


hth,
Chris.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux