array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.db2-stmt-error.php', 1 => 'db2_stmt_error', ), 'up' => array ( 0 => 'ref.ibm-db2.php', 1 => 'IBM DB2 関数', ), 'prev' => array ( 0 => 'function.db2-statistics.php', 1 => 'db2_statistics', ), 'next' => array ( 0 => 'function.db2-stmt-errormsg.php', 1 => 'db2_stmt_errormsg', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/ibm_db2/functions/db2-stmt-error.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ibm_db2 >= 1.0.0)
db2_stmt_error — SQL 文が返す SQLSTATE を含む文字列を返す
SQL 文が返す SQLSTATE を含む文字列を返します。
db2_stmt_error() の引数にステートメントリソースを 渡さなかった場合は、直近で (例えば db2_prepare() あるいは db2_exec() を使用して) 返そうとしたステートメントリソースに関連する SQLSTATE を返します。
SQLSTATE の値の意味を調べるには、DB2 コマンドラインプロセッサのプロンプトで
次のコマンドを発行します。
db2 '?
また、db2_stmt_errormsg() をコールして、
明示的なエラーメッセージと、それに関連する SQLCODE の値を取得することも可能です。
sqlstate-value
'
stmt
有効なステートメントリソース。
SQLSTATE を含む文字列を返します。