LancerForums
11-21-2002, 06:36 PM
Hi,
I'd like to write a script that will run everynight and delete x old threads that are redirects.
I want to make sure that I get this right, since I don't know exactly how the moved w/ redirect feature works, though.
Would this script do the job correctly without deleting the real thread?
//
// Delete all redirects that are older then $numdays
//
$numdays=3;
$datecut=time()-($numdays*86400);
mysql_query("DELETE FROM thread WHERE open='10' AND lastpost<=$datecut");
Thanks,
Mark
I'd like to write a script that will run everynight and delete x old threads that are redirects.
I want to make sure that I get this right, since I don't know exactly how the moved w/ redirect feature works, though.
Would this script do the job correctly without deleting the real thread?
//
// Delete all redirects that are older then $numdays
//
$numdays=3;
$datecut=time()-($numdays*86400);
mysql_query("DELETE FROM thread WHERE open='10' AND lastpost<=$datecut");
Thanks,
Mark