php-doc-en/reference/ingres-ii/functions/ingres-result-seek.xml
Jakub Vrana a7c40376bc Fix protos
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@308228 c90b9560-bf6c-de11-be94-00142212c4b1
2011-02-10 21:21:24 +00:00

137 lines
3.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.ingres-result-seek" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>ingres_result_seek</refname>
<refpurpose>Set the row position before fetching data</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>ingres_result_seek</methodname>
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
<methodparam><type>int</type><parameter>position</parameter></methodparam>
</methodsynopsis>
<para>
This function is used to position the cursor associated with the result
resource before issuing a fetch. If <link
linkend="ini.ingres.array-index-start">ingres.array_index_start</link>
is set to 0 then the first row is 0 else it is 1.
<function>ingres_result_seek</function> can be used only with queries that
make use of <link linkend="ini.ingres.scrollable">scrollable
cursors</link>. It cannot be used with
<function>ingres_unbuffered_query</function>.
</para>
<note>
<title>Related Configurations</title>
<para>
See also the <link linkend="ini.ingres.scrollable">ingres.scrollable</link>
and <link linkend="ini.ingres.array-index-start">ingres.array_index_start</link> directives in
<link linkend="ingres.configuration">Runtime Configuration</link>.
</para>
</note>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>result</parameter></term>
<listitem>
<para>
The result identifier for a query
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>position</parameter></term>
<listitem>
<para>
The row to position the cursor on. If <link
linkend="ini.ingres.array-index-start">ingres.array_index_start</link>
is set to 0, then the first row is 0, else it is 1
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Position the cursor on the 3rd row</title>
<programlisting role="php">
<![CDATA[
<?php
$result=ingres_query($link, "select * from airport where ap_ccode = 'ES' order by ap_place asc");
/* goto row 3 */
if (!ingres_result_seek($result, 3))
{
echo ingres_errno() . " - " . ingres_error . "\n";
die("i died");
}
else
{
$airport = ingres_fetch_object ($result);
{
echo $airport->ap_iatacode . " - " . $airport->ap_name . "\n";
}
}
ingres_commit($link);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>ingres_query</function></member>
<member><function>ingres_fetch_array</function></member>
<member><function>ingres_fetch_assoc</function></member>
<member><function>ingres_fetch_object</function></member>
<member><function>ingres_fetch_row</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->