<!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>Get field information from a result</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.sybase-fetch-assoc.html">sybase_fetch_assoc</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sybase-fetch-object.html">sybase_fetch_object</a></div> <div class="up"><a href="ref.sybase.html">Sybase Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.sybase-fetch-field" class="refentry"> <div class="refnamediv"> <h1 class="refname">sybase_fetch_field</h1> <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">sybase_fetch_field</span> — <span class="dc-title">Get field information from a result</span></p> </div> <div class="refsect1 description" id="refsect1-function.sybase-fetch-field-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">object</span> <span class="methodname"><strong>sybase_fetch_field</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$result</code></span> [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$field_offset</code><span class="initializer"> = -1</span></span> ] )</div> <p class="para rdfs-comment"> <span class="function"><strong>sybase_fetch_field()</strong></span> can be used in order to obtain information about fields in a certain query result. </p> </div> <div class="refsect1 parameters" id="refsect1-function.sybase-fetch-field-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">result</code></em></span> <dd> <p class="para"> </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">field_offset</code></em></span> <dd> <p class="para"> If the field offset isn't specified, the next field that wasn't yet retrieved by <span class="function"><strong>sybase_fetch_field()</strong></span> is retrieved. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.sybase-fetch-field-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns an object containing field information. </p> <p class="para"> The properties of the object are: </p> <ul class="itemizedlist"> <li class="listitem"> <span class="simpara"> name - column name. if the column is a result of a function, this property is set to computed#N, where #N is a serial number. </span> </li> <li class="listitem"> <span class="simpara"> column_source - the table from which the column was taken </span> </li> <li class="listitem"> <span class="simpara"> max_length - maximum length of the column </span> </li> <li class="listitem"> <span class="simpara"> numeric - 1 if the column is numeric </span> </li> <li class="listitem"> <span class="simpara"> type - datatype of the column </span> </li> </ul> </div> <div class="refsect1 seealso" id="refsect1-function.sybase-fetch-field-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.sybase-field-seek.html" class="function" rel="rdfs-seeAlso">sybase_field_seek()</a> - Sets field offset</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.sybase-fetch-assoc.html">sybase_fetch_assoc</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sybase-fetch-object.html">sybase_fetch_object</a></div> <div class="up"><a href="ref.sybase.html">Sybase Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>