<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.uodbc.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.odbc-field-len.php',
    1 => 'odbc_field_len',
    2 => 'Get the length (precision) of a field',
  ),
  'up' => 
  array (
    0 => 'ref.uodbc.php',
    1 => 'ODBC Functions',
  ),
  'prev' => 
  array (
    0 => 'function.odbc-fetch-row.php',
    1 => 'odbc_fetch_row',
  ),
  'next' => 
  array (
    0 => 'function.odbc-field-name.php',
    1 => 'odbc_field_name',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/uodbc/functions/odbc-field-len.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.odbc-field-len" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">odbc_field_len</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">odbc_field_len</span> &mdash; <span class="dc-title">Get the length (precision) of a field</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.odbc-field-len-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>odbc_field_len</strong></span>(<span class="methodparam"><span class="type">Odbc\Result</span> <code class="parameter">$statement</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$field</code></span>): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Gets the length of the field referenced by number in the given result
   identifier.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.odbc-field-len-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">statement</code></dt>
     <dd>
      <p class="para">
       The ODBC result object.
      </p>
     </dd>
    
    
     <dt><code class="parameter">field</code></dt>
     <dd>
      <p class="para">
       The field number. Field numbering starts at 1.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.odbc-field-len-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the field length, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on error.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.odbc-field-len-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.4.0</td>
 <td>
  <code class="parameter">statement</code> expects an <span class="classname"><strong class="classname">Odbc\Result</strong></span>
  instance now; previously, a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> was expected.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.odbc-field-len-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.odbc-field-scale.php" class="function" rel="rdfs-seeAlso">odbc_field_scale()</a> - Get the scale of a field</span> to get the scale of a
    floating point number</li>
   </ul>
  </p>
 </div>

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