uTools-Manuals/docs/php/odbc_error.html
2019-04-08 23:22:26 +08:00

71 lines
2.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Get the last error code</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.odbc-error" class="refentry">
<div class="refnamediv">
<h1 class="refname">odbc_error</h1>
<p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">odbc_error</span> &mdash; <span class="dc-title">Get the last error code</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.odbc-error-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>odbc_error</strong></span>
([ <span class="methodparam"><span class="type">resource</span> <code class="parameter">$connection_id</code></span>
] ) : <span class="type">string</span></div>
<p class="simpara">
Returns a six-digit ODBC state, or an empty string if there has been no
errors.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.odbc-error-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">connection_id</code></dt>
<dd>
<p class="para">ODBC 连接标识符,详见
<span class="function"><a href="odbc_connect.html" class="function">odbc_connect()</a></span></p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.odbc-error-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
If <code class="parameter">connection_id</code> is specified, the last state
of that connection is returned, else the last state of any connection
is returned.
</p>
<p class="para">
This function returns meaningful value only if last odbc query failed
(i.e. <span class="function"><a href="odbc_exec.html" class="function">odbc_exec()</a></span> returned <strong><code>FALSE</code></strong>).
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.odbc-error-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="odbc_errormsg.html" class="function" rel="rdfs-seeAlso">odbc_errormsg()</a> - Get the last error message</span></li>
<li class="member"><span class="function"><a href="odbc_exec.html" class="function" rel="rdfs-seeAlso">odbc_exec()</a> - Prepare and execute an SQL statement</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>