Source of: /manual/en/function.sqlite-current.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.sqlite.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.sqlite-current.php',
1 => 'sqlite_current',
),
'up' =>
array (
0 => 'ref.sqlite.php',
1 => 'SQLite Functions',
),
'prev' =>
array (
0 => 'function.sqlite-create-function.php',
1 => 'sqlite_create_function',
),
'next' =>
array (
0 => 'function.sqlite-error-string.php',
1 => 'sqlite_error_string',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.sqlite-current" class="refentry">
<div class="refnamediv">
<h1 class="refname">sqlite_current</h1>
<h1 class="refname">SQLiteResult->current</h1>
<h1 class="refname">SQLiteUnbuffered->current</h1>
<p class="verinfo">(PHP 5, PECL sqlite >= 1.0.0)</p><p class="refpurpose"><span class="refname">sqlite_current</span> -- <span class="refname">SQLiteResult->current</span> -- <span class="refname">SQLiteUnbuffered->current</span> — <span class="dc-title">Fetches the current row from a result set as an array</span></p>
</div>
<a name="function.sqlite-current.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">array</span> <span class="methodname"><b>sqlite_current</b></span>
( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$result</tt></span>
[, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$result_type</tt><span class="initializer"> = SQLITE_BOTH</span></span>
[, <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$decode_binary</tt><span class="initializer"> = true</span></span>
]] )</div>
<p class="para rdfs-comment">Object oriented style (method):</p>
<div class="classsynopsis">
<div class="ooclass"><b class="classname">SQLiteResult</b></div>
<div class="methodsynopsis dc-description">
<span class="type">array</span> <span class="methodname"><a href="function.current.php" class="function">current</a></span>
([ <span class="methodparam"><span class="type">int</span> <tt class="parameter">$result_type</tt><span class="initializer"> = SQLITE_BOTH</span></span>
[, <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$decode_binary</tt><span class="initializer"> = true</span></span>
]] )</div>
</div>
<div class="classsynopsis">
<div class="ooclass"><b class="classname">SQLiteUnbuffered</b></div>
<div class="methodsynopsis dc-description">
<span class="type">array</span> <span class="methodname"><a href="function.current.php" class="function">current</a></span>
([ <span class="methodparam"><span class="type">int</span> <tt class="parameter">$result_type</tt><span class="initializer"> = SQLITE_BOTH</span></span>
[, <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$decode_binary</tt><span class="initializer"> = true</span></span>
]] )</div>
</div>
<p class="para">
<b>sqlite_current()</b> is identical to
<a href="function.sqlite-fetch-array.php" class="function">sqlite_fetch_array()</a> except that it does not advance
to the next row prior to returning the data; it returns the data from the
current position only.
</p>
</div>
<a name="function.sqlite-current.parameters"></a><div class="refsect1 parameters">
<h3 class="title">Parameters</h3>
<p class="para">
</p><dl>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">result</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
The SQLite result resource. This parameter is not required when using
the object-oriented method.
</p>
</dd>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">result_type</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">The optional <i><tt class="parameter">result_type</tt></i>
parameter accepts a constant and determines how the returned array will be
indexed. Using <b><tt class="constant">SQLITE_ASSOC</tt></b> will return only associative
indices (named fields) while <b><tt class="constant">SQLITE_NUM</tt></b> will return
only numerical indices (ordinal field numbers). <b><tt class="constant">SQLITE_BOTH</tt></b>
will return both associative and numerical indices.
<b><tt class="constant">SQLITE_BOTH</tt></b> is the default for this function.</p>
</dd>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">decode_binary</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">When the <i><tt class="parameter">decode_binary</tt></i>
parameter is set to <b><tt class="constant">TRUE</tt></b> (the default), PHP will decode the binary encoding
it applied to the data if it was encoded using the
<a href="function.sqlite-escape-string.php" class="function">sqlite_escape_string()</a>. You should normally leave this
value at its default, unless you are interoperating with databases created by
other sqlite capable applications.</p>
</dd>
</dl>
<p>
</p>
</div>
<a name="function.sqlite-current.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
Returns an array of the current row from a result set; <b><tt class="constant">FALSE</tt></b> if the
current position is beyond the final row.
</p>
<p class="para">The column names returned by
<b><tt class="constant">SQLITE_ASSOC</tt></b> and <b><tt class="constant">SQLITE_BOTH</tt></b> will be
case-folded according to the value of the
<a href="sqlite.configuration.php#ini.sqlite.assoc-case" class="link">sqlite.assoc_case</a> configuration
option.</p>
</div>
<a name="function.sqlite-current.seealso"></a><div class="refsect1 seealso">
<h3 class="title">See Also</h3>
<p class="para">
</p><ul class="simplelist">
<li class="member"><a href="function.sqlite-seek.php" class="function" rel="rdfs-seeAlso">sqlite_seek()</a> - Seek to a particular row number of a buffered result set</li>
<li class="member"><a href="function.sqlite-next.php" class="function" rel="rdfs-seeAlso">sqlite_next()</a> - Seek to the next row number</li>
<li class="member"><a href="function.sqlite-fetch-array.php" class="function" rel="rdfs-seeAlso">sqlite_fetch_array()</a> - Fetches the next row from a result set as an array</li>
</ul><p>
</p>
</div>
</div><?php manual_footer(); ?>