note 9564 rejected from function.ocierror by didou
| From: | didou@php.net | Date: | Mon, 11 Aug 2003 21:25:32 +0000 |
| Subject: | note 9564 rejected from function.ocierror by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53915@lists.php.net to get a copy of this message | ||
Note Submitter: mac@clondiag.com
----
the docs are confusing: ocierror expects the context that
contains the error to be passed in.
sample:
$c = ocilogon("u","p");
if (! $c) var_dump(ocierror()); // we have no connection yet
// so the error is stored global.
$s = ociparse($c,"select * from tubu");
if (! $s) var_dump(ocierror($c)); // parse failed - error is
// stored in connection handle
$err = ociexecute($s);
if (! $err) var_dump(ocierror($s)); // error code for ociexecute()
// is stored in the
// statement handle
(quoted from a mail written by Thies C. Arntzen)