<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ibase.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.ibase-field-info.php',
    1 => 'ibase_field_info',
    2 => 'Get information about a field',
  ),
  'up' => 
  array (
    0 => 'ref.ibase.php',
    1 => 'Firebird/InterBase Functions',
  ),
  'prev' => 
  array (
    0 => 'function.ibase-fetch-row.php',
    1 => 'ibase_fetch_row',
  ),
  'next' => 
  array (
    0 => 'function.ibase-free-event-handler.php',
    1 => 'ibase_free_event_handler',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ibase/functions/ibase-field-info.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ibase-field-info" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ibase_field_info</h1>
  <p class="verinfo">(PHP 5, PHP 7 &lt; 7.4.0)</p><p class="refpurpose"><span class="refname">ibase_field_info</span> &mdash; <span class="dc-title">Get information about a field</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ibase-field-info-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ibase_field_info</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$result</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$field_number</code></span>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="simpara">
   Returns an array with information about a field after a select
   query has been run.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ibase-field-info-parameters">
  <h3 class="title">Parameters</h3>
  <dl>
   
    <dt><code class="parameter">result</code></dt>
    <dd>
     <span class="simpara">
      An InterBase result identifier.
     </span>
    </dd>
   
   
    <dt><code class="parameter">field_number</code></dt>
    <dd>
     <span class="simpara">
      Field offset.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ibase-field-info-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="simpara">
   Returns an array with the following keys: <code class="literal">name</code>,
   <code class="literal">alias</code>, <code class="literal">relation</code>,
   <code class="literal">length</code> and <code class="literal">type</code>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.ibase-field-info-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 <span class="function"><strong>ibase_field_info()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$rs </span><span style="color: #007700">= </span><span style="color: #0000BB">ibase_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT * FROM tablename"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$coln </span><span style="color: #007700">= </span><span style="color: #0000BB">ibase_num_fields</span><span style="color: #007700">(</span><span style="color: #0000BB">$rs</span><span style="color: #007700">);<br />for (</span><span style="color: #0000BB">$i </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">$i </span><span style="color: #007700">&lt; </span><span style="color: #0000BB">$coln</span><span style="color: #007700">; </span><span style="color: #0000BB">$i</span><span style="color: #007700">++) {<br />    </span><span style="color: #0000BB">$col_info </span><span style="color: #007700">= </span><span style="color: #0000BB">ibase_field_info</span><span style="color: #007700">(</span><span style="color: #0000BB">$rs</span><span style="color: #007700">, </span><span style="color: #0000BB">$i</span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"name: "</span><span style="color: #007700">. </span><span style="color: #0000BB">$col_info</span><span style="color: #007700">[</span><span style="color: #DD0000">'name'</span><span style="color: #007700">]. </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />    echo </span><span style="color: #DD0000">"alias: "</span><span style="color: #007700">. </span><span style="color: #0000BB">$col_info</span><span style="color: #007700">[</span><span style="color: #DD0000">'alias'</span><span style="color: #007700">]. </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />    echo </span><span style="color: #DD0000">"relation: "</span><span style="color: #007700">. </span><span style="color: #0000BB">$col_info</span><span style="color: #007700">[</span><span style="color: #DD0000">'relation'</span><span style="color: #007700">]. </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />    echo </span><span style="color: #DD0000">"length: "</span><span style="color: #007700">. </span><span style="color: #0000BB">$col_info</span><span style="color: #007700">[</span><span style="color: #DD0000">'length'</span><span style="color: #007700">]. </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />    echo </span><span style="color: #DD0000">"type: "</span><span style="color: #007700">. </span><span style="color: #0000BB">$col_info</span><span style="color: #007700">[</span><span style="color: #DD0000">'type'</span><span style="color: #007700">]. </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ibase-field-info-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.ibase-num-fields.php" class="function" rel="rdfs-seeAlso">ibase_num_fields()</a> - Get the number of fields in a result set</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>