Created
September 7, 2013 21:35
-
-
Save septor/6479543 to your computer and use it in GitHub Desktop.
Remove unread PMs older than a year, and remove all PMs older than 5 years
**THIS IS UNTESTED**
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// drop this in your root e107 directory | |
include("class2.php"); | |
// unread in the last 12 months | |
$sql->db_Delete("private_msg", "pm_sent < ".(time() - 31556926)." AND pm_read = 0") or die(mysql_error()); | |
// older than 5 years | |
$sql->db_Delete("private_msg", "pm_sent < ".(time() - 157784630)) or die(mysql_error()); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment