krohnathlonman
06-30-2005, 05:23 PM
Ok, I've written something that removes alot of posts and threads but there's still for some reason alot of threads that don't have posts....
$sql = "DELETE FROM thread WHERE attach = '0'";
$result = mysql_query($sql) or die(mysql_error());
printf("<br>Crappy Threads Removed: %d\n", mysql_affected_rows());
$sql = "DELETE FROM post WHERE attach = '0'";
$result = mysql_query($sql) or die(mysql_error());
printf("<br>Crappy Posts Removed: %d\n", mysql_affected_rows());
How would I go about removing threads where the firstpostid no longer exists?
$sql = "DELETE FROM thread WHERE attach = '0'";
$result = mysql_query($sql) or die(mysql_error());
printf("<br>Crappy Threads Removed: %d\n", mysql_affected_rows());
$sql = "DELETE FROM post WHERE attach = '0'";
$result = mysql_query($sql) or die(mysql_error());
printf("<br>Crappy Posts Removed: %d\n", mysql_affected_rows());
How would I go about removing threads where the firstpostid no longer exists?