<?
include ("connection.php");
include ("frames_header.php");


$id=$_GET["id"];


pg_query($c,"begin");

/*
$requete="DELETE FROM \"ARTICLE_MORPHOGEN_PICTURE\" where \"MORPHOGEN_ID\" in (
select \"MORPHOGEN_ID\" from \"ARTICLE_MORPHOGEN\" where \"ARTICLE_ID\"='$id'
)";
pg_query($c,$requete) or die(pg_last_error($c));

$requete="DELETE FROM \"ARTICLE_MORPHOGEN\" where \"ARTICLE_ID\"='$id'";
pg_query($c,$requete) or die(pg_last_error($c));
*/

$requete="DELETE FROM \"ARTICLE_FATE\" where \"ARTICLE_ID\"='$id'";
pg_query($c,$requete) or die (pg_last_error($c));

$requete="DELETE FROM \"ARTICLE_ANATOMY\" where \"ARTICLE_ID\"='$id'";
pg_query($c,$requete) or die (pg_last_error($c));


$requete="DELETE FROM \"ARTICLE_GENE\" where \"ARTICLE_ID\"='$id'";
pg_query($c,$requete) or die (pg_last_error($c));


$requete="DELETE FROM \"ARTICLE\" where \"ARTICLE_ID\"='$id'";
pg_query($c,$requete) or die (pg_last_error($c));





pg_query($c,"commit");


print "<center><h3>Article deleted !</h3><br><br>You can close the window !</center>";


include ("frames_footer.php");
?>

<SCRIPT LANGUAGE="JavaScript"> javascript:opener.location.reload(); self.close(); </script>
