note 9564 modified in function.ocierror by maxim
| From: | maxim@php.net | Date: | Fri, 16 May 2003 01:23:25 +0000 |
| Subject: | note 9564 modified in function.ocierror by maxim | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48078@lists.php.net to get a copy of this message | ||
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)
--was--
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)
http://www.php.net/manual/en/function.ocierror.php