ora_error

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

ora_error -- 獲得 Oracle 錯誤訊息

描述

string ora_error ( [resource cursor_or_connection] )

返回一個 XXX-NNNNN 形式的錯誤訊息,XXX 報告錯誤來源, NNNNN 報告錯誤號。

注: 對 connection ids 的支援從 3.0.4 開始。

在 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