Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a34ed6838d4b29d38abd504392a4a797 > files > 2020

php-manual-es-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>ovrimos_fetch_into</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Manual de PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="Ovrimos SQL functions"
HREF="ref.ovrimos.html"><LINK
REL="PREVIOUS"
TITLE="ovrimos_execute"
HREF="function.ovrimos-execute.html"><LINK
REL="NEXT"
TITLE="ovrimos_fetch_row"
HREF="function.ovrimos-fetch-row.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual de PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.ovrimos-execute.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.ovrimos-fetch-row.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.ovrimos-fetch-into"
></A
>ovrimos_fetch_into</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN57296"
></A
><P
>    (PHP 4 &#62;= 4.0.3)</P
>ovrimos_fetch_into&nbsp;--&nbsp;Fetches a row from the result set</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN57299"
></A
><H2
>Description</H2
>int <B
CLASS="methodname"
>ovrimos_fetch_into</B
> ( int result_id, array result_array [, string how [, int rownumber]])<BR
></BR
><P
>&#13;     <B
CLASS="function"
>ovrimos_fetch_into()</B
> is used to fetch a row
     from the result set.
    </P
><P
>&#13;     <B
CLASS="function"
>ovrimos_fetch_into()</B
> fetches a row from the
     result set into 'result_array', which should be passed by
     reference. Which row is fetched is determined by the two last
     parameters.  'how' is one of 'Next' (default), 'Prev', 'First',
     'Last', 'Absolute', corresponding to forward direction from
     current position, backward direction from current position,
     forward direction from the start, backward direction from the end
     and absolute position from the start (essentially equivalent to
     'first' but needs 'rownumber'). Case is not
     significant. 'Rownumber' is optional except for absolute
     positioning. Returns <TT
CLASS="constant"
><B
>TRUE</B
></TT
> or <TT
CLASS="constant"
><B
>FALSE</B
></TT
>.
    </P
><P
>&#13;     <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN57323"
></A
><P
><B
>Ejemplo 1. A fetch into example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;?php
$conn=ovrimos_connect ("neptune", "8001", "admin", "password");
if ($conn!=0) {
    echo "Connection ok!";
    $res=ovrimos_exec ($conn,"select table_id, table_name from sys.tables");
    if ($res != 0) {
        echo "Statement ok!";
        if (ovrimos_fetch_into ($res, &#38;$row)) {
            list ($table_id, $table_name) = $row;
            echo "table_id=".$table_id.", table_name=".$table_name."\n";
            if (ovrimos_fetch_into ($res, &#38;$row)) {
                list ($table_id, $table_name) = $row;
                echo "table_id=".$table_id.", table_name=".$table_name."\n";
            } else {
                echo "Next: error\n";
            }
        } else {
            echo "First: error\n";
        }
        ovrimos_free_result ($res);
    }
    ovrimos_close ($conn);
}
?&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
     This example will fetch a row.
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.ovrimos-execute.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Inicio</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.ovrimos-fetch-row.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>ovrimos_execute</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.ovrimos.html"
ACCESSKEY="U"
>Subir</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>ovrimos_fetch_row</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>