Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > ebb1914cf182a88528b4547490db1dd8 > files > 1333

kdewebdev-quanta-doc-3.5.9-2mdv2008.1.x86_64.rpm

<HTML
><HEAD
><TITLE
>pg_Fetch_Row</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="manual.html"><LINK
REL="UP"
TITLE="PostgreSQL functions"
HREF="ref.pgsql.html"><LINK
REL="PREVIOUS"
TITLE="pg_Fetch_Object"
HREF="function.pg-fetch-object.html"><LINK
REL="NEXT"
TITLE="pg_FieldIsNull"
HREF="function.pg-fieldisnull.html"></HEAD
><BODY
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><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.pg-fetch-object.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.pg-fieldisnull.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.pg-fetch-row"
>pg_Fetch_Row</A
></H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN24043"
></A
>pg_Fetch_Row -- get row as enumerated array</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN24046"
></A
><H2
>Description</H2
><DIV
CLASS="funcsynopsis"
><P
></P
><CODE
CLASS="FUNCDEF"
>array pg_fetch_row</CODE
>(int result, int row);<P
></P
></DIV
><P
> 
     Returns: An array that corresponds to the fetched row, or false
     if there are no more rows.
    </P
><P
>&#13;     <B
CLASS="function"
>pg_fetch_row()</B
> fetches one row of data from
     the result associated with the specified result identifier.  The
     row is returned as an array.  Each result column is stored in an
     array offset, starting at offset 0.
    </P
><P
>&#13;     Subsequent call to <B
CLASS="function"
>pg_fetch_row()</B
> would
     return the next row in the result set, or false if there are no
     more rows.
    </P
><P
>&#13;     See also: <A
HREF="function.pg-fetch-array.html"
><B
CLASS="function"
>pg_fetch_array()</B
></A
>,
     <A
HREF="function.pg-fetch-object.html"
><B
CLASS="function"
>pg_fetch_object()</B
></A
>,
     <A
HREF="function.pg-result.html"
><B
CLASS="function"
>pg_result()</B
></A
>.
     <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><P
><B
>Example 1. Postgres fetch row</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="programlisting"
>  1&nbsp;
  2&nbsp;&#60;?php 
  3&nbsp;$conn = pg_pconnect("","","","","publisher");
  4&nbsp;if (!$conn) {
  5&nbsp;    echo "An error occured.\n";
  6&nbsp;    exit;
  7&nbsp;}
  8&nbsp;
  9&nbsp;$result = pg_Exec ($conn, "SELECT * FROM authors");
 10&nbsp;if (!$result) {
 11&nbsp;    echo "An error occured.\n";
 12&nbsp;    exit;
 13&nbsp;}
 14&nbsp;
 15&nbsp;$row = pg_fetch_row ($result, 0);
 16&nbsp;echo $row[0] . " &#60;- row\n";
 17&nbsp;
 18&nbsp;$row = pg_fetch_row ($result, 1);
 19&nbsp;echo $row[0] . " &#60;- row\n";
 20&nbsp;
 21&nbsp;$row = pg_fetch_row ($result, 2);
 22&nbsp;echo $row[1] . " &#60;- row\n";
 23&nbsp;?&#62;
 24&nbsp;      </PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.pg-fetch-object.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="manual.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.pg-fieldisnull.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>pg_Fetch_Object</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.pgsql.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>pg_FieldIsNull</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>