Firebird 2.0
PHP5 Programming
Manual

FBIRD_ERRCODE

Purpose

Use the fbird_errcode function to retrieve the error code of the last error that occurred, if any.

Syntax

<errcode> ::=
   fbird_errcode()

Element 
Type
Description
<return>
mixed
Integer code of last error that occurred, False if no error had occured

Semantics

The fbird_errcode function returns the SQL error code of the last error that occurred. It returns False if the last operation was succesful.

Example

The below example prints the last error code if there was an error:

$err = fbird_errcode();
if( $err==False ) {
   echo 'No error occurred';
} else {
   echo 'Error was: '.$err;
}



See also

fbird_errmsg


previous page goto index next page

Legal information