My timestamp format looks like this: 2014-02-27 08:54:53
The table is product_views
, and the time field is ViewStamp
. I don't know how to DELETE rows older than 7 days.
$query="DELETE FROM product_views WHERE ViewStamp< ?";
Thanks for the help. I am still a beginner so if I did not provide enough info please let me know and I will edit.
edit: Using MySQL