--- inc/newsDelete.php 2001/08/03 09:12:42 1.1 +++ inc/newsDelete.php 2001/10/23 16:13:59 1.3 @@ -8,6 +8,8 @@ if (!$sth->execute()) error("Cannot execute query: \"$sql\""); while ($row = $sth->fetchrow_array()) MyDelete($syspicdir."/".$row[0]); $sth->finish(); + $sql = "DELETE FROM related WHERE (news_id = $id)"; + $dbh->dbh_do($sql); $sql = "DELETE FROM paragraphs WHERE (news_id = $id)"; $dbh->dbh_do($sql); $sql = "SELECT title_pic FROM news WHERE (news_id = $id)"; @@ -16,6 +18,10 @@ if (!$sth->execute()) error("Cannot execute query: \"$sql\""); while ($row = $sth->fetchrow_array()) MyDelete($syspicdir."/".$row[0]); $sth->finish(); + $sql = "DELETE FROM cat_news WHERE (news_id = $id)"; + $dbh->dbh_do($sql); + $sql = "DELETE FROM spec_news WHERE (news_id = $id)"; + $dbh->dbh_do($sql); $sql = "DELETE FROM news WHERE (news_id = $id)"; $dbh->dbh_do($sql); }