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




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



Reply via email to