From fe8c2806cdba70479e351299881a395dc2be7785 Mon Sep 17 00:00:00 2001 From: wdenk Date: Sun, 3 Nov 2002 00:38:21 +0000 Subject: Initial revision --- tools/bddb/dodelete.php | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 tools/bddb/dodelete.php (limited to 'tools/bddb/dodelete.php') diff --git a/tools/bddb/dodelete.php b/tools/bddb/dodelete.php new file mode 100644 index 0000000000..839ad8cf10 --- /dev/null +++ b/tools/bddb/dodelete.php @@ -0,0 +1,64 @@ + ?> + + // CSIRO Manufacturing Science and Technology, Preston Lab + + // dodelete page (hymod_bddb / boards) + + require("defs.php"); + + pg_head("$bddb_label - Delete Board Results"); + + if (!($serno=intval($serno))) + die("the board serial number was not specified"); + + mysql_query("delete from boards where serno=$serno"); + + if(mysql_errno()) { + $errstr = mysql_error(); + echo "\t\n"; + echo "\t\t

\n"; + echo "\t\t\tThe following error was encountered:\n"; + echo "\t\t

\n"; + echo "\t\t
\n"; + printf("\t\t\t%s\n", $errstr); + echo "\t\t
\n"; + echo "\t
\n"; + } + else { + echo "\t\n"; + echo "\t\t

\n"; + echo "\t\t\tThe board with serial number $serno was" + . " successfully deleted\n"; + mysql_query("delete from log where serno=$serno"); + if (mysql_errno()) { + $errstr = mysql_error(); + echo "\t\t\t\n"; + echo "\t\t\t\t

\n"; + echo "\t\t\t\t\tBut the following error occurred " . + "when deleting the log entries:\n"; + echo "\t\t\t\t

\n"; + echo "\t\t\t\t
\n"; + printf("\t\t\t\t\t%s\n", $errstr); + echo "\t\t\t\t
\n"; + echo "\t\t\t
\n"; + } + echo "\t\t

\n"; + echo "\t
\n"; + } +?> +

+ + + + + +
+ Back to Browse + + Back to Start +
+ -- cgit v1.2.1