I'm trying to create script where I have to use logic kind of update records created in the last seven days.
$Update_ratings_table = mysql_query(
"update ratings set rating = '5,5,5,5,5,5,5,5,5,5' where pid= '765' AND Date = ?????????"
);
Date format is: YYYY-MM-DD.
How can I create query which can update only last seven days records every week starting Monday?
I cannot hard code date because I'll run script on daily basis where it should take ONLY last 7 days records automatically.