note 19834 rejected from function.ocierror by maxim
| From: | maxim@php.net | Date: | Sun, 10 Nov 2002 01:17:59 +0000 |
| Subject: | note 19834 rejected from function.ocierror by maxim | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-39247@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