note 19834 added to function.ocierror
| From: | vi at sh dot nu | Date: | Tue, 12 Mar 2002 20:29:35 +0000 |
| Subject: | note 19834 added to function.ocierror | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27679@lists.php.net to get a copy of this message | ||
Hi,
I've always been bothered by the fact that PHP never gives me the little * that sqlplus does
under an error in a SQL statement. Well, to that end, I've created a patch against PHP 4.1.2
that adds a new element to the array returned by OCIError called "sqltext". In this string
you'll find a "<span style="color:#FF0000;
font-weight:bold"><ERROR></span>" just before the problem area in
the SQL statement.
Apply the patch, then do:
$error = OCIError ($statement);
echo $error["sqltext"];
The patch can be had here:
http://www.sh.nu/php-oci8-OCIError.patch
I hope you find this useful.
Daniel Ceregatti
--
http://www.php.net/manual/en/function.ocierror.php
http://master.php.net/manage/user-notes.php?action=edit+19834
http://master.php.net/manage/user-notes.php?action=delete+19834
http://master.php.net/manage/user-notes.php?action=reject+19834