How to delete a MySQL record after a certain time

前端 未结 3 1741
渐次进展
渐次进展 2020-11-27 03:42

I want to delete some messages from my MySQL database after 7 days.

My message table rows have this format: id | message | date

The date is a timestamp in th

3条回答
  •  遥遥无期
    2020-11-27 04:16

    For those out there who are on a shared hosting, like 1and1's, and can't create events, an alternative is to use webcron

    You just need to tell webcron the url of the php script you'd like to be run, and they'll trigger it for you at the intervals you want

提交回复
热议问题