endo Posted July 30, 2008 Posted July 30, 2008 I was getting fed up of having to run a sql command to clear out all the old mails taking up precious database space so i came up with this. Its a simple thing to do no php file 3 lines is all Simply run this sql You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. add these two lines to your cron day You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. ---if anyone spots any problems with this please dont hesitate to say and im undoubtably sure someone has a better way of doing it lol as always but hey enjoy it its free--- Quote
Tonka Posted July 30, 2008 Posted July 30, 2008 Re: Auto delete old mail here is a better way that will decrease the load on your server, just add this to your day cron and your done You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. this will delete all mails older than 30 days Quote
endo Posted July 30, 2008 Author Posted July 30, 2008 Re: Auto delete old mail thanks tonka was looking for an improveent to my method i struggle with unix timestamps so thanks a million tonka :mrgreen: Quote
Tonka Posted July 30, 2008 Posted July 30, 2008 Re: Auto delete old mail not a problem, it was posted on CE in a cleanup cron Quote
$$ ?????? $$ Posted August 1, 2008 Posted August 1, 2008 Re: Auto delete old mail I've been wanting something like this. :-) Quote
endo Posted August 3, 2008 Author Posted August 3, 2008 Re: Auto delete old mail very handy can use it for almost all of the recorded pieces of your database simple changes and it can be used for events $db->query("DELETE FROM events WHERE evTIME < (unix_timestamp() -2592000)",$c); Quote
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.