endo Posted July 30, 2008 Share 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 Link to comment Share on other sites More sharing options...
Tonka Posted July 30, 2008 Share 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 Link to comment Share on other sites More sharing options...
endo Posted July 30, 2008 Author Share 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 Link to comment Share on other sites More sharing options...
Tonka Posted July 30, 2008 Share Posted July 30, 2008 Re: Auto delete old mail not a problem, it was posted on CE in a cleanup cron Quote Link to comment Share on other sites More sharing options...
$$ ?????? $$ Posted August 1, 2008 Share Posted August 1, 2008 Re: Auto delete old mail I've been wanting something like this. :-) Quote Link to comment Share on other sites More sharing options...
Joel Posted August 1, 2008 Share Posted August 1, 2008 Re: Auto delete old mail Good little addon :) Quote Link to comment Share on other sites More sharing options...
endo Posted August 3, 2008 Author Share 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 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.