(PHP 4, PHP 5 <= 5.0.5)
ora_error — Oracle エラーメッセージを取得する
指定したカーソルあるいは接続上で直近に実行された文のエラーメッセージを返します。
Oracle カーソルあるいは接続 ID。
XXX-NNNNN という形式のエラーメッセージが返されます。ここで、 XXX は何処からエラーが発生したか、 NNNNN はエラーメッセージを識別します。
Unix 版の Oracle 上では、 以下のようにエラーメッセージに関する詳細を得ることができます。
$> oerr ora 00001
上の例の出力は、たとえば 以下のようになります。
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