Jump to content
MakeWebGames

Recommended Posts

Posted

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---

Posted

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

Posted

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:

Posted

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);

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.   Paste as plain text instead

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