From 8ea6ea6db019f68436a69f36aae55a9f205efa35 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 30 Jan 2013 15:43:52 +0100 Subject: doc: Nils Weber doesnt have an 'e' in his firstname --- .../Dateistruktur/lessons/errror_tests.php | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 doc/nils-diplom/Dateistruktur/lessons/errror_tests.php (limited to 'doc/nils-diplom/Dateistruktur/lessons/errror_tests.php') diff --git a/doc/nils-diplom/Dateistruktur/lessons/errror_tests.php b/doc/nils-diplom/Dateistruktur/lessons/errror_tests.php new file mode 100755 index 0000000..cb59e58 --- /dev/null +++ b/doc/nils-diplom/Dateistruktur/lessons/errror_tests.php @@ -0,0 +1,52 @@ +".$err['message']."\n"; + die(); +} + + +function fehler($stmt) +{ + + $username = "nils"; + $password = "nils"; + $database = "ora9"; + + $con = @OCILogon($username, $password, $database); + if (!$con) { + $e = OCIError(); // For OCILogon errors pass no parameter + PrintOCIError($e); + } + + echo "Connected OK\n"; + + $stid = @OCIParse($con, $stmt); + if (!$stid) + { + $e = OCIError($con); // For OCIParse errors pass the connection + PrintOCIError($e); + } + + echo "Parsed OK\n"; + + $r = @OCIExecute($stid); + if (!$r) + { + $e = OCIError($stid); // For OCIExecute errors pass the statement + PrintOCIError($e); + } + + echo "Executed OK\n"; +} + + + +?> -- cgit