<?
include ("connection.php");


$id=$_GET["id"];


pg_query($c,"begin");

$requete="DELETE FROM \"REFERENCE\" where \"BIO_ID\"='$id'";
pg_query($c,$requete);

$requete="DELETE FROM \"SEQUENCE\" where \"MOL_ID\"='$id'";
pg_query($c,$requete);

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

$requete="DELETE FROM \"MOL_ENTITY\" where \"MOL_ID\"='$id' and \"TYPE\"='tool'";
pg_query($c,$requete) or die(pg_last_error($c));

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

pg_query($c,"commit");


?>

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