View Single Post
Old 12-12-2012, 06:27 PM   PM User | #1
mharrison
New Coder

 
Join Date: Dec 2012
Posts: 52
Thanks: 12
Thanked 0 Times in 0 Posts
mharrison is an unknown quantity at this point
Show results for the week

I'm trying to get my code to display all results entered into the table for the current week.

Right now my code looks like this:
Code:
$past = date('Y-m-d', strtotime('-1 weeks');
$result = mysql_query("SELECT * FROM patterns WHERE datetxt >= '$past' ORDER BY dsptxt");
however it keeps giving me errors no matter how I try to change the code. Right now the error is
Quote:
Parse error: syntax error, unexpected ';' in /homepages/22/d292640728/htdocs/crochet/phptest/new.php on line 9
I would like it to use Monday as the start day no matter what day of the week the query is run.
mharrison is offline   Reply With Quote