Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 1890

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

<HTML
><HEAD
><TITLE
>OCIFetchInto</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Oracle 8 functions"
HREF="ref.oci8.html"><LINK
REL="PREVIOUS"
TITLE="OCIFetch"
HREF="function.ocifetch.html"><LINK
REL="NEXT"
TITLE="OCIFetchStatement"
HREF="function.ocifetchstatement.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"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.ocifetch.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.ocifetchstatement.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.ocifetchinto"
></A
>OCIFetchInto</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN67129"
></A
><P
>    (PHP 3&#62;= 3.0.4, PHP 4 )</P
>OCIFetchInto&nbsp;--&nbsp;Fetches the next row into result-array</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN67132"
></A
><H2
>Description</H2
>int <B
CLASS="methodname"
>OCIFetchInto</B
> ( int stmt, array &#38;result [, int mode])<BR
></BR
><P
>&#13;     <B
CLASS="function"
>OCIFetchInto()</B
> fetches the next row (for SELECT
     statements) into the <TT
CLASS="parameter"
><I
>result</I
></TT
> array.
     <B
CLASS="function"
>OCIFetchInto()</B
> will overwrite the previous
     content of <TT
CLASS="parameter"
><I
>result</I
></TT
>. By default 
     <TT
CLASS="parameter"
><I
>result</I
></TT
> will contain a zero-based array of all
     columns that are not <TT
CLASS="constant"
><B
>NULL</B
></TT
>.
    </P
><P
>&#13;     The <TT
CLASS="parameter"
><I
>mode</I
></TT
> parameter allows you to change the
     default behaviour. You can specify more than one flag by simply
     adding them up (eg OCI_ASSOC+OCI_RETURN_NULLS). The known flags
     are:
     <P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
>&#13;       <TT
CLASS="literal"
>OCI_ASSOC</TT
> Return an associative array.
      </TD
></TR
><TR
><TD
>&#13;       <TT
CLASS="literal"
>OCI_NUM</TT
> Return an numbered array starting with
       zero. (DEFAULT)
      </TD
></TR
><TR
><TD
>&#13;       <TT
CLASS="literal"
>OCI_RETURN_NULLS</TT
> Return empty columns.
      </TD
></TR
><TR
><TD
>&#13;       <TT
CLASS="literal"
>OCI_RETURN_LOBS</TT
> Return the value of a LOB
       instead of the descriptor.
      </TD
></TR
></TBODY
></TABLE
><P
></P
>
    </P
><P
>&#13;     <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN67165"
></A
><P
><B
>Example 1. A simple <B
CLASS="function"
>OCIFetchInto()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;?php
$conn = ocilogon("username","password");

$query = "SELECT apples FROM oranges";

$statement = OCIParse ($conn, $query);
OCIExecute ($statement);

while (OCIFetchInto ($statement, $row, OCI_ASSOC)) {
    print $row['apples'];
}
?&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
    </P
><P
>&#13;     See also <A
HREF="function.ocifetch.html"
><B
CLASS="function"
>OCIFetch()</B
></A
> and
     <A
HREF="function.ociexecute.html"
><B
CLASS="function"
>OCIExecute()</B
></A
>. 
    </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.ocifetch.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.ocifetchstatement.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>OCIFetch</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.oci8.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>OCIFetchStatement</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>