Jump to content

[SOLVED] mysql query select last week


corillo181

Recommended Posts

hi!

i got a mysql table with different dates.

i would like to make a query that select everything between today and last week.

i got the logic which is.

 

$today = strtotime('now');
$lastweek = strt0time('-1 week');
$query ="select from product where unixtime_stamp(date)>='$lastweek' and unixtime_stamp(date)<$today";

Link to comment
https://forums.phpfreaks.com/topic/73567-solved-mysql-query-select-last-week/
Share on other sites

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.