Let's say today's date is 2006-06-01.
How would I get data for the previous week without having to specify it? For example, the following wouldn't work:
$enddate=date(Ymd);
$startdate=date(Ymd)-6;
SELECT data FROM table WHERE date BETWEEN '$startdate' AND '$enddate'
I want $startdate to be equal to 2006-05-26. Is this possible?