定義和用法
odbc_errormsg - 獲取最后一條錯誤訊息語法
odbc_errormsg ( [ resource $connection_id ] )
回傳包含最后一個ODBC錯誤訊息的字串,如果沒有錯誤則回傳空字串,
引數
| 引數 | 必需的 | 描述 |
|---|---|---|
| connection_id | 否 | ODBC 連接識別符號,詳見 odbc_connect(), |
回傳值
如果指定了connection_id,則回傳該連接的最后狀態,否則回傳任何連接的最后狀態, 僅當上一個odbc查詢失敗(即odbc_exec()回傳FALSE)時,此函式才回傳有意義的值,// you must set the connection first
if (odbc_errormsg())
{
echo odbc_errormsgmsg($conn);
}
// if you want to show the perfect error message
// then format it using string functions.
相關函式
odbc_error() - 獲取最后的錯誤代碼 odbc_exec() - 準備并執行一條SQL陳述句
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/131474.html
標籤:PHP
下一篇:108將有序陣列轉化為二查搜索樹
