Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
ora_error

ora_error

(PHP 3, PHP 4, PHP 5 <= 5.1.0RC1)

ora_error -- Gets an Oracle error message

Description

string ora_error ( [resource cursor_or_connection] )

Returns the error message of the last executed statement on the specified cursor or connection.

Parameters

cursor_or_connection

An Oracle cursor or connection identifier.

Return Values

Returns an error message of the form XXX-NNNNN where XXX is where the error comes from and NNNNN identifies the error message.

ChangeLog

VersionDescription
5.1.0

The oracle extension is deprecated in favor of oci8.

3.0.4 Support for connection identifiers was added.

Examples

On Unix versions of Oracle, you can find details about an error message like this:

$> oerr ora 00001

The above example will output something similar to:

00001, 00000,
"unique constraint (%s.%s) violated" // *Cause: An update or insert
statement attempted to insert a duplicate key //         For Trusted
ORACLE configured in DBMS MAC mode, you may see //         this message
if a duplicate entry exists at a different level.  // *Action: Either
remove the unique restriction or do not insert the key

Notes

When using oci8 as a replacement for the deprecated oracle extension, consider using:

oci_error()