English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The odbc_error() function retrieves the last error code.
string odbc_error ([ resource $connection_id ] )
It is used to get the last code error information
If connection_id is specified, it returns the last status of that connection; otherwise, it returns the last status of any connection.
This function returns a meaningful value only when the last ODBC query fails (i.e., odbc_exec() returns false).
Serial Number | Parameters and Description |
---|---|
1 | connection_id It contains information about the connection ID |
Try the following example
<?php if (odbc_error()) { echo odbc_errormsg($conn); } ?>