Jump to content

[SOLVED] Retrieving 1 week's worth information


9three

Recommended Posts

Hey,

 

I'm using the date function in MySQL CURDATE to store the date of a post.

 

What I'm trying to do is show posts that are from today's date and 7 days ago.

 

So what Im trying to do is something like this:

 

SELECT fname, lname, date, time
FROM posts
BETWEEN CURDATE() AND ???

 

I'm trying to figure out how to do CURDATE minus 7 (1 week ago)

 

Anyone know how to accomplish this? thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.