uTools-Manuals/docs/php/ifx_do.html
2019-04-28 19:00:34 +08:00

96 lines
4.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>Execute a previously prepared SQL-statement</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.ifx-do" class="refentry">
<div class="refnamediv">
<h1 class="refname">ifx_do</h1>
<p class="verinfo">(PHP 4, PHP 5 &lt; 5.2.1)</p><p class="refpurpose"><span class="refname">ifx_do</span> &mdash; <span class="dc-title">Execute a previously prepared SQL-statement</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.ifx-do-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>ifx_do</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$result_id</code></span>
) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
Executes a previously prepared query or opens a cursor for it.
</p>
<p class="para">
Does NOT free <code class="parameter">result_id</code> on error.
</p>
<p class="para">
Also sets the real number of
<span class="function"><a href="ifx_affected_rows.html" class="function">ifx_affected_rows()</a></span> for non-select statements
for retrieval by <span class="function"><a href="ifx_affected_rows.html" class="function">ifx_affected_rows()</a></span>.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.ifx-do-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">result_id</code></dt>
<dd>
<p class="para">
<code class="parameter">result_id</code> is a valid resultid returned by
<span class="function"><a href="ifx_query.html" class="function">ifx_query()</a></span> or
<span class="function"><a href="ifx_prepare.html" class="function">ifx_prepare()</a></span> (select type queries only!).
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.ifx-do-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
成功时返回 <strong><code>TRUE</code></strong> 或者在失败时返回 <strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.ifx-do-seealso">
<h3 class="title">参见</h3>
<p class="para">
<div class="example" id="example-1285">
<p><strong>Example #1 <span class="function"><strong>ifx_do()</strong></span> Example</strong></p>
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$conn&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fx_connect</span><span style="color: #007700">(&nbsp;</span><span style="color: #DD0000">"db"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"user"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"password"&nbsp;</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$result&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ifx_prepare</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;customer_num,&nbsp;company&nbsp;FROM&nbsp;customer"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$conn</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">ifx_do</span><span style="color: #007700">(</span><span style="color: #0000BB">$result</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>
</div>
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.ifx-do-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="ifx_prepare.html" class="function" rel="rdfs-seeAlso">ifx_prepare()</a> - Prepare an SQL-statement for execution</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>