Re: [PHP] beginnind and end of the week

2004-11-02 Thread Jerry Swanson
Your solution works only for Monday. For Tuesday output is below start -- 20041108 end - 20041114 I have no idea why ti doesn't wotk. On Mon, 1 Nov 2004 02:45:59 +, Curt Zirzow <[EMAIL PROTECTED]> wrote: > * Thus wrote Jerry Swanson: > > > > I need to run a query using PHP/MYSQL. The q

Re: [PHP] beginnind and end of the week

2004-11-01 Thread Curt Zirzow
* Thus wrote Tim Owens: > > > > // this weeks monday > > $m = strtotime('this monday', $t); > > > > // next weeks monday minus 1 second > > $s = strtotime('next monday', $t) - 1; > > > > echo date('r', $m), "\n"; > > echo date('r', $s), "\n" > > > >?> > > > >Now $m and $s contain the proper t

RE: [PHP] beginnind and end of the week

2004-11-01 Thread Tim Owens
>-Original Message- >From: Curt Zirzow [mailto:[EMAIL PROTECTED] >Sent: Monday, 1 November 2004 3:46 p.m. >To: [EMAIL PROTECTED] >Subject: Re: [PHP] beginnind and end of the week > >* Thus wrote Jerry Swanson: >> I need to run a query using PHP/MYSQL. The query

Re: [PHP] beginnind and end of the week

2004-10-31 Thread Curt Zirzow
* Thus wrote Jerry Swanson: > I need to run a query using PHP/MYSQL. The query should be for a week. > So if today is tuesday, the query should be from Monday to Sunday. > How in in php I can know when the beginning and end of the week? > Now $m and $s contain the proper timestamps. Curt

Re: [PHP] beginnind and end of the week

2004-10-31 Thread Sebastien Pahud
Hi Jerry, I dunno if i got what you want to do... But i would say : 1. Set a number to each day of the week (0 = sunday, 1 = monday, 6 = saturday) 2. Get the date of today, so you can get the number of the day : $noDay 3. Do you SQL request from ($noDay + 1) to ($noDay-1) (just need to test if $

[PHP] beginnind and end of the week

2004-10-31 Thread Jerry Swanson
I need to run a query using PHP/MYSQL. The query should be for a week. So if today is tuesday, the query should be from Monday to Sunday. How in in php I can know when the beginning and end of the week? TH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php