I imagine this is pretty simple, but can\'t figure it out. I\'m trying to make a few pages - one which will contain results selected from my mysql db\'s table for today, thi
To get last week's data in MySQL. This works for me even across the year boundries.
select * from orders_order where YEARWEEK(my_date_field)= YEARWEEK(DATE_SUB(CURRENT_DATE(), INTERVAL 1 WEEK));
To get current week's data
select * from orders_order where YEARWEEK(date_sold)= YEARWEEK(CURRENT_DATE());