22
i cant purge my old unread pm in mp manager module and manually with a script because my PM table has a huge size about 400 MB.
is this possible to modify this?
any help would be really appreciated
my script is:
define("user", "USER");
define("pass", "PASS");
define("host", "localhost");
define("db", "DB");
$cxn = mysql_connect(host ,user, pass);
mysql_select_db(db);
$delete_time = time() - ( 30 * 24 * 60 * 60 ); // 30 days/month * 24 hrs/day
// * 60 minutes/hour * 60 seconds/min.
$sql = "DELETE from `xoops_priv_msgs` WHERE `read_msg` = '0' AND `msg_time` < '$delete_time'";
//This script would delete everything older than 30 days that has been not read.
$result = mysql_query($sql, $cxn);
?>
by run this script my server will be down totally.