spinner0205 Posted February 23, 2011 Share Posted February 23, 2011 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! Quote Link to comment Share on other sites More sharing options...
requinix Posted February 23, 2011 Share Posted February 23, 2011 Deleting old data can be a bad habit to develop. Can you just adjust your queries to not show dates in the past? Quote Link to comment Share on other sites More sharing options...
spinner0205 Posted February 23, 2011 Author Share Posted February 23, 2011 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. Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted February 23, 2011 Share Posted February 23, 2011 Why not just run a login query to do it? Quote Link to comment Share on other sites More sharing options...
spinner0205 Posted February 23, 2011 Author Share Posted February 23, 2011 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. Quote Link to comment Share on other sites More sharing options...
fenway Posted February 24, 2011 Share Posted February 24, 2011 Cron job? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.