Re: beginnind and end of the week

From: Date: Sun, 31 Oct 2004 11:20:53 +0000
Subject: Re: beginnind and end of the week
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-200762@lists.php.net to get a copy of this message
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 $noDay > 6, then you loop it to 0) Seb Jerry Swanson wrote:
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


« previous php.general (#200762) next »