<!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>Returns the name of a particular field</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.sqlite-fetch-string.html">sqlite_fetch_string</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sqlite-has-more.html">sqlite_has_more</a></div> <div class="up"><a href="ref.sqlite.html">SQLite Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.sqlite-field-name" class="refentry"> <div class="refnamediv"> <h1 class="refname">sqlite_field_name</h1> <h1 class="refname">SQLiteResult::fieldName</h1> <h1 class="refname">SQLiteUnbuffered::fieldName</h1> <p class="verinfo">(PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)</p><p class="refpurpose"><span class="refname">sqlite_field_name</span> -- <span class="refname">SQLiteResult::fieldName</span> -- <span class="refname">SQLiteUnbuffered::fieldName</span> — <span class="dc-title">Returns the name of a particular field</span></p> </div> <div class="refsect1 description" id="refsect1-function.sqlite-field-name-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">string</span> <span class="methodname"><strong>sqlite_field_name</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_index</code></span> )</div> <p class="para rdfs-comment">Object oriented style (method):</p> <div class="methodsynopsis dc-description"> <span class="type">string</span> <span class="methodname"><strong>SQLiteResult::fieldName</strong></span> ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$field_index</code></span> )</div> <div class="methodsynopsis dc-description"> <span class="type">string</span> <span class="methodname"><strong>SQLiteUnbuffered::fieldName</strong></span> ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$field_index</code></span> )</div> <p class="para rdfs-comment"> Given the ordinal column number, <em><code class="parameter">field_index</code></em>, <span class="function"><strong>sqlite_field_name()</strong></span> returns the name of that field in the result set <em><code class="parameter">result</code></em>. </p> </div> <div class="refsect1 parameters" id="refsect1-function.sqlite-field-name-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"> The SQLite result resource. This parameter is not required when using the object-oriented method. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">field_index</code></em></span> <dd> <p class="para"> The ordinal column number in the result set. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.sqlite-field-name-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns the name of a field in an SQLite result set, given the ordinal column number; <strong><code>FALSE</code></strong> on error. </p> <p class="para">The column names returned by <strong><code>SQLITE_ASSOC</code></strong> and <strong><code>SQLITE_BOTH</code></strong> will be case-folded according to the value of the <a href="sqlite.configuration.html#ini.sqlite.assoc-case" class="link">sqlite.assoc_case</a> configuration option.</p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.sqlite-fetch-string.html">sqlite_fetch_string</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sqlite-has-more.html">sqlite_has_more</a></div> <div class="up"><a href="ref.sqlite.html">SQLite Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>