RE: [PHP-DB] payperiods

2002-11-12 Thread Darren Bentley
Ok, that makes sense. I have all the payperiods specified in a table to begin with, then just query selecting all >= start && <= end. Thanks, - Darren On Tue, 2002-11-12 at 11:29, Peter Beckman wrote: > Put the dates for employees into one table. > > In another, put the payperiods. > > You cou

RE: [PHP-DB] payperiods

2002-11-12 Thread Peter Beckman
Put the dates for employees into one table. In another, put the payperiods. You could populate the payperiods table for the next 90 years if you wanted if it is always on a 2 week schedule. To look at past payperiods: select start, end from payperiods where start = '$querydate'; Or just date

RE: [PHP-DB] payperiods

2002-11-12 Thread Darren Bentley
Our payperiods will always be 2 week increments. So if I specify a starting day in the database I need to have that starting day always updated to the current starting day. (when we switch to the new payperiod), so as Jerrad mentioned I could use a cron job. But how would I be able to look at pa

RE: [PHP-DB] payperiods

2002-11-12 Thread Hutchins, Richard
> To: Darren Bentley; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] payperiods > > > I would think that the hard coded date is the way I'd do that. > > maybe not neccessarily a start_dt, but maybe a pay_pd_st > date. This date is just the date the payperiod falls on. You

RE: [PHP-DB] payperiods

2002-11-12 Thread Anderson, Jerrad
t: Tuesday, November 12, 2002 1:51 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] payperiods Hello, I have build a php calendar and want to implement 2 week payperiods so staff can enter their hours worked. Then I can summarize work done per pay period. Any idea what the easiest way to do this is? I could h

Re: [PHP-DB] payperiods

2002-11-12 Thread Peter Beckman
$nextpayperiod = mktime(0,0,0,$month,$day+14,$year); $humanreadabledate = date("r",$nextpayperiod); where $month is numeric month, $day is the last payperiod day (1-31), and $year is the year of the payperiod. $nextpayperiod will equal the unix timestamp of 14 days from the last payperiod. Peter

[PHP-DB] payperiods

2002-11-12 Thread Darren Bentley
Hello, I have build a php calendar and want to implement 2 week payperiods so staff can enter their hours worked. Then I can summarize work done per pay period. Any idea what the easiest way to do this is? I could hard code a starting date into a database, then go up 2 weeks at a time from there.