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

93 lines
4.3 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>List of SQL fieldproperties</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.ifx-fieldproperties" class="refentry">
<div class="refnamediv">
<h1 class="refname">ifx_fieldproperties</h1>
<p class="verinfo">(PHP 4, PHP 5 &lt; 5.2.1)</p><p class="refpurpose"><span class="refname">ifx_fieldproperties</span> &mdash; <span class="dc-title">List of SQL fieldproperties</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.ifx-fieldproperties-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>ifx_fieldproperties</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$result_id</code></span>
) : <span class="type">array</span></div>
<p class="para rdfs-comment">
Returns the Informix SQL fieldproperties of every field in the
query as an associative array. Properties are encoded as:
&quot;SQLTYPE;length;precision;scale;ISNULLABLE&quot; where SQLTYPE = the
Informix type like &quot;SQLVCHAR&quot; etc. and ISNULLABLE = &quot;Y&quot; or &quot;N&quot;.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.ifx-fieldproperties-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-fieldproperties-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
Returns an associative array with fieldnames as key and the SQL
fieldproperties as data for a query with <code class="parameter">result_id</code>.
Returns <strong><code>FALSE</code></strong> on errors.
</p>
</div>
<div class="refsect1 examples" id="refsect1-function.ifx-fieldproperties-examples">
<h3 class="title">范例</h3>
<p class="para">
<div class="example" id="example-1288">
<p><strong>Example #1 Informix SQL fieldproperties</strong></p>
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$properties&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ifx_fieldproperties</span><span style="color: #007700">(</span><span style="color: #0000BB">$resultid</span><span style="color: #007700">);<br />if&nbsp;(!isset(</span><span style="color: #0000BB">$properties</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">/*&nbsp;...&nbsp;error&nbsp;...&nbsp;*/<br /></span><span style="color: #007700">}<br />foreach&nbsp;(</span><span style="color: #0000BB">$properties&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$fname&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">$val</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$fname</span><span style="color: #DD0000">:\t&nbsp;property&nbsp;=&nbsp;</span><span style="color: #0000BB">$val</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>
</div>
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.ifx-fieldproperties-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="ifx_fieldtypes.html" class="function" rel="rdfs-seeAlso">ifx_fieldtypes()</a> - List of Informix SQL fields</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>