PHP 4.0 Bug #8089: No ODBC function that returns SQL error messages
| From: | jlim at natsoft dot com dot my | Date: | Mon, 04 Dec 2000 07:00:27 +0000 |
| Subject: | PHP 4.0 Bug #8089: No ODBC function that returns SQL error messages | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39931@lists.php.net to get a copy of this message | ||
From: jlim@natsoft.com.my
Operating system: Windows
PHP version: 4.0.3pl1
PHP Bug Type: ODBC related
Bug description: No ODBC function that returns SQL error messages
I am having a problem because ODBC error messages are sent to standard output and there doesn't
seem to be a function to capture the ODBC error message.
May i suggest a new ODBC function ODBC_Error() which saves the last error message for each
connection.
Eg.
$ok = ODBC_Execute($id,'select * from badtable');
if (!$ok) LogError(ODBC_Error($id));
This can be implemented in php_odbc.c, presumbly by modifying the odbc_sql_error function.
461 void odbc_sql_error(ODBC_SQL_ERROR_PARAMS)
--
Edit Bug report at: http://bugs.php.net/?id=8089&edit=1