mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 22:38:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@308222 c90b9560-bf6c-de11-be94-00142212c4b1
111 lines
3.9 KiB
XML
111 lines
3.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="function.cubrid-move-cursor" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>cubrid_move_cursor</refname>
|
|
<refpurpose>Is used to move the current cursor location</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>cubrid_move_cursor</methodname>
|
|
<methodparam><type>resource</type><parameter>req_identifier</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>origin</parameter><initializer>CUBRID_CURSOR_CURRENT</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
The <function>cubrid_move_cursor</function> function is used to move the current cursor location of <parameter>req_identifier</parameter> by the value set in the <parameter>offset</parameter> argument, to the direction set in the <parameter>origin</parameter> argument. To set the <parameter>origin</parameter> argument, you can use CUBRID_CURSOR_FIRST for the first part of the result, CUBRID_CURSOR_CURRENT for the current location of the result, or CUBRID_CURSOR_LAST for the last part of the result. If <parameter>origin</parameter> argument is not explicitly designated, then the function uses CUBRID_CURSOR_CURRENT as its default value.
|
|
</para>
|
|
<para>
|
|
If the value of cursor movement range goes over the valid limit, then the cursor moves to the next location after the valid range for the cursor. For example, if you move 20 units in the result with the size of 10, then the cursor will move to 11th place and return CUBRID_NO_MORE_DATA.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>req_identifier</parameter></term>
|
|
<listitem><para>Request identifier.</para></listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>offset</parameter></term>
|
|
<listitem><para>Number of units you want to move the cursor.</para></listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>origin</parameter></term>
|
|
<listitem><para>Location where you want to move the cursor from CUBRID_CURSOR_FIRST, CUBRID_CURSOR_CURRENT, CUBRID_CURSOR_LAST.</para></listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
CUBRID_CURSOR_SUCCESS, when process is successful.
|
|
</para>
|
|
<para>
|
|
CUBRID_NO_MORE_DATA, when it is not a valid cursor location.
|
|
</para>
|
|
<para>
|
|
CUBRID_CURSOR_ERROR, in case of error.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title><function>cubrid_move_cursor</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
cubrid_move_cursor ($req_handle, 1, CUBRID_CURSOR_FIRST);
|
|
// move to the first possible cursor location
|
|
$row = cubrid_fetch ($req_handle);
|
|
echo $row["id"], $row["name"];
|
|
|
|
cubrid_move_cursor ($req_handle, 1, CUBRID_CURSOR_LAST);
|
|
// move to the last possible cursor location
|
|
$row = cubrid_fetch ($req_handle);
|
|
echo $row["id"], $row["name"];
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>cubrid_execute</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
|
|
-->
|