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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.