I have data with below format.
id - autoincrement
myDate - timestamp
What I want to extract is get ids of for the last week.
Note By last week, I meant from Sat - Thu and not last 7 days. Considering current date (12-Feb-2013), for me, last week would be 2-Feb-2013 to 8-Feb-2013
.
I know you would say, week starts from Sunday, but as I am working in Arab countries, here Friday is OFF and work starts from Saturday.
I know for last 7 days it would be just below code
BETWEEN NOW() and DATE_SUB(NOW(), INTERVAL 7 DAY)