mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-12-21 02:55:49 +08:00
0.0.1
This commit is contained in:
93
docs/php/dbx_error.html
Normal file
93
docs/php/dbx_error.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!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>Report the error message of the latest function call in the module</title>
|
||||
</head>
|
||||
<body class="docs"><div id="layout">
|
||||
<div id="layout-content"><div id="function.dbx-error" class="refentry">
|
||||
<div class="refnamediv">
|
||||
<h1 class="refname">dbx_error</h1>
|
||||
<p class="verinfo">(PHP 4 >= 4.0.6, PHP 5 < 5.1.0, PECL dbx >= 1.1.0)</p><p class="refpurpose"><span class="refname">dbx_error</span> — <span class="dc-title">
|
||||
Report the error message of the latest function call in the module
|
||||
</span></p>
|
||||
|
||||
</div>
|
||||
<div class="refsect1 description" id="refsect1-function.dbx-error-description">
|
||||
<h3 class="title">说明</h3>
|
||||
<div class="methodsynopsis dc-description">
|
||||
<span class="methodname"><strong>dbx_error</strong></span>
|
||||
( <span class="methodparam"><span class="type">object</span> <code class="parameter">$link_identifier</code></span>
|
||||
) : <span class="type">string</span></div>
|
||||
|
||||
<p class="para rdfs-comment">
|
||||
<span class="function"><strong>dbx_error()</strong></span> returns the last error message.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsect1 parameters" id="refsect1-function.dbx-error-parameters">
|
||||
<h3 class="title">参数</h3>
|
||||
<p class="para">
|
||||
<dl>
|
||||
|
||||
|
||||
<dt>
|
||||
<code class="parameter">link_identifier</code></dt>
|
||||
|
||||
<dd>
|
||||
|
||||
<p class="para">
|
||||
The DBX link object returned by <span class="function"><a href="dbx_connect.html" class="function">dbx_connect()</a></span>
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsect1 returnvalues" id="refsect1-function.dbx-error-returnvalues">
|
||||
<h3 class="title">返回值</h3>
|
||||
<p class="para">
|
||||
Returns a string containing the error message from the last function call
|
||||
of the abstracted module (e.g. mysql module). If there are multiple
|
||||
connections in the same module, just the last error is given. If there are
|
||||
connections on different modules, the latest error is returned for the
|
||||
module specified by the <code class="parameter">link_identifier</code> parameter.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsect1 examples" id="refsect1-function.dbx-error-examples">
|
||||
<h3 class="title">范例</h3>
|
||||
<p class="para">
|
||||
<div class="example" id="example-972">
|
||||
<p><strong>Example #1 <span class="function"><strong>dbx_error()</strong></span> example</strong></p>
|
||||
<div class="example-contents">
|
||||
<div class="phpcode"><pre><span style="color: #000000">
|
||||
<span style="color: #0000BB"><?php<br />$link </span><span style="color: #007700">= </span><span style="color: #0000BB">dbx_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">DBX_MYSQL</span><span style="color: #007700">, </span><span style="color: #DD0000">"localhost"</span><span style="color: #007700">, </span><span style="color: #DD0000">"db"</span><span style="color: #007700">, </span><span style="color: #DD0000">"username"</span><span style="color: #007700">, </span><span style="color: #DD0000">"password"</span><span style="color: #007700">)<br /> or die(</span><span style="color: #DD0000">"Could not connect"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$result </span><span style="color: #007700">= </span><span style="color: #0000BB">dbx_query</span><span style="color: #007700">(</span><span style="color: #0000BB">$link</span><span style="color: #007700">, </span><span style="color: #DD0000">"select id from non_existing_table"</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$result </span><span style="color: #007700">== </span><span style="color: #0000BB">0</span><span style="color: #007700">) {<br /> echo </span><span style="color: #0000BB">dbx_error</span><span style="color: #007700">(</span><span style="color: #0000BB">$link</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">dbx_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$link</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
|
||||
</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsect1 notes" id="refsect1-function.dbx-error-notes">
|
||||
<h3 class="title">注释</h3>
|
||||
<blockquote class="note"><p><strong class="note">Note</strong>:
|
||||
<p class="para">
|
||||
Always refer to the module-specific documentation as well.
|
||||
</p>
|
||||
<p class="para">
|
||||
The error message for <span class="productname">Microsoft SQL Server</span> is actually the result
|
||||
of the <span class="function"><a href="mssql_get_last_message.html" class="function">mssql_get_last_message()</a></span> function.
|
||||
</p>
|
||||
<p class="para">
|
||||
The error message for Oracle (oci8) is not implemented yet.
|
||||
</p>
|
||||
</p></blockquote>
|
||||
</div>
|
||||
|
||||
</div></div></div></body></html>
|
||||
Reference in New Issue
Block a user