Jump to content

Auto delete database entries from table that coorespond to today's date


spinner0205

Recommended Posts

I have database entries added to a MySQL database table and under one column the date is inserted but plus 1 month (example if it is 2/23/11 then 3/23/11 is inserted). Therefore I would like to have a cron job or something similar that deletes these entries all together when the date on this column matches the current day. How would I go about doing this? Thanks in advance!

Well its for a donations system. When the user donates they get certain benefits that last for 1 month. After which I need the database entry to be removed so that their status as a user is returned to normal.

 

EDIT: This doesn't have anything to do with keeping the database clean or anything.

Because its not tied to any sort of other databases or my main website. Its more a separate system where they enter a few pieces of information that are added to the database through Paypal IPN. It doesn't require any logging in or out to do so and actually has nothing to do with a website. They are donating for special privileges on a game server that uses a MySQL table.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.