Hi i'm trying to sort a table of information from a mysql database, my query is basically, select * from data where date > '$lastweek'
the problem is that i want to get todays date as below then i want $lastweek to be 7 days before $datetoday, so that it pulls out all the info generated with in the last 7 days.
setlocale ("LC_TIME", "C");
$datetoday = (strftime ("%Y-%m-%d"));
$lastweek = ??????
i hope that someone knows of a way to do this, thanks Martin