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


$id=$_GET["embryoid"];


pg_query($c,"begin");


//delete from embryo
$requete="DELETE FROM \"EMBRYO_BIOMETRY\" where \"EMBRYO_ID\"='$id'";
pg_query($c,$requete) or die ("Error ... please contact the administrator");

$requete="DELETE FROM \"EMBRYO_BIOMETRY_SHAPE\" where \"EMBRYO_ID\"='$id'";
pg_query($c,$requete) or die ("Error ... please contact the administrator");

$erquete="DELETE FROM \"EMBRYO_NEIGHBOR\" where \"EMBRYO_ID\"='$id'";
pg_query($c,$requete) or die ("Error ... please contact the administrator");

$requete="DELETE FROM \"EMBRYO\" where \"EMBRYO_ID\"='$id'";
pg_query($c,$requete) or die ("Error ... please contact the administrator");

$requete="DELETE FROM \"ENTRY_ORIGIN\" where \"BIO_ID\"='$id'";
pg_query($c,$requete) or die ("Error ... please contact the administrator");

$requete="DELETE FROM \"BIO_ENTITY\" where \"BIO_ID\"='$id'";
pg_query($c,$requete) or die ("Error ... please contact the administrator");

print "<br><br><br><center><h3>Delete Succesfully done !</h3></center>";


pg_query($c,"commit");

?>


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

<?
include ("frames_footer.php");
?>