-2

i have a database with a Row named date and a type of Timestamp. Now i have a problem with only viewing content where it is added in the current week. So that you don't see content of last week. How can i do this in a query?, btw i am using MySQL

1 Answers1

0

Assuming you're happy with MySQL's definition of week:

where('WEEKOFYEAR(DATE(`date`)) = WEEKOFYEAR(NOW())');
Neville Kuyt
  • 29,247
  • 1
  • 37
  • 52