/[health_html]/inc/newsDelete.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /inc/newsDelete.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Wed Sep 19 12:23:57 2001 UTC (22 years, 7 months ago) by ravilov
Branch: MAIN
Changes since 1.1: +4 -0 lines
Added thefilez/med/ (PLIVAmed site). Other major changes...

1 ravilov 1.1 <?php
2     function newsDelete($id) {
3     if (!$id) return;
4     global $dbh, $syspicdir;
5     $sql = "SELECT pic FROM paragraphs WHERE (news_id = $id)";
6     $sth = $dbh->prepare($sql);
7     if (!$sth) error("Cannot prepare query: \"$sql\"");
8     if (!$sth->execute()) error("Cannot execute query: \"$sql\"");
9     while ($row = $sth->fetchrow_array()) MyDelete($syspicdir."/".$row[0]);
10     $sth->finish();
11     $sql = "DELETE FROM paragraphs WHERE (news_id = $id)";
12     $dbh->dbh_do($sql);
13     $sql = "SELECT title_pic FROM news WHERE (news_id = $id)";
14     $sth = $dbh->prepare($sql);
15     if (!$sth) error("Cannot prepare query: \"$sql\"");
16     if (!$sth->execute()) error("Cannot execute query: \"$sql\"");
17     while ($row = $sth->fetchrow_array()) MyDelete($syspicdir."/".$row[0]);
18     $sth->finish();
19 ravilov 1.2 $sql = "DELETE FROM cat_news WHERE (news_id = $id)";
20     $dbh->dbh_do($sql);
21     $sql = "DELETE FROM spec_news WHERE (news_id = $id)";
22     $dbh->dbh_do($sql);
23 ravilov 1.1 $sql = "DELETE FROM news WHERE (news_id = $id)";
24     $dbh->dbh_do($sql);
25     }
26     ?>

  ViewVC Help
Powered by ViewVC 1.1.26