View Single Post
Old 12-13-2012, 01:03 PM   PM User | #5
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
Quote:
Originally Posted by Fou-Lu View Post
Glad to be of help! Hehehe.
The initial problem was here: $past = date('Y-m-d', strtotime('-1 weeks');. You're simply missing the ending ); however, using the functions within the query directly is IMO a much better option.
Thanks! It always seems to be a missing element somewhere. Now, I do like the code I did end up getting working better, the question remains if I can use that code to display items in the database added 2 weeks ago, and 3 weeks ago.

It's basically for a "Recently Added" type page that shows "New this week", "New Last Week", and "New 3 Weeks Ago".

The 1st bit of code works, but when you get to the 2 and 3 weeks ago, it also displays everything from this week as well. Would like to isolate the query to just those items from 2 and 3 weeks in the past, if possible.
mharrison is offline   Reply With Quote