hi there, thanks for the script, but i am having some problems getting it to work for some reason
just as a test, i went ahead and tried to remove articles that were 3 days old, and it didnt work, any suggestions?
i replacced db host, etc with my information, and than set the time for 3 and 3 for the days
thanks for your time
Code:
<?php
mysql_connect("localhost", "my db name", "my db pass") or die("error1");
mysql_select_db("my db name") or die("error2");
$fourteen_days = 3;
$now = date("U") - $fourteen_days;
$ninety_days = 3;
$now2 = date("U") - $ninety_days;
$now = date("Y-m-d H:i:s",$now);
$now2 = date("Y-m-d H:i:s",$now2);
mysql_query("delete from links where link_date < '$now' AND link_status = 'queued'");
mysql_query("delete from links where link_date < '$now2' AND link_status = 'published'");
mysql_query("delete from links where link_status = 'discard'");
?>