Sophie

Sophie

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

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

<HTML
><HEAD
><TITLE
>sesam_fetch_result</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="SESAM database functions"
HREF="ref.sesam.html"><LINK
REL="PREVIOUS"
TITLE="sesam_fetch_array"
HREF="function.sesam-fetch-array.html"><LINK
REL="NEXT"
TITLE="sesam_fetch_row"
HREF="function.sesam-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.sesam-fetch-array.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.sesam-fetch-row.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.sesam-fetch-result"
></A
>sesam_fetch_result</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN69230"
></A
><P
>    (PHP 3 CVS only)</P
>sesam_fetch_result&nbsp;--&nbsp;Return all or part of a query result</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN69233"
></A
><H2
>Description</H2
>mixed <B
CLASS="methodname"
>sesam_fetch_result</B
> ( string result_id [, int max_rows])<BR
></BR
><P
>&#13;     Returns a mixed array with the query result entries, optionally
     limited to a maximum of <TT
CLASS="parameter"
><I
>max_rows</I
></TT
> rows.
     Note that both row and column indexes are zero-based.
     <DIV
CLASS="table"
><A
NAME="AEN69246"
></A
><P
><B
>Tabla 1. 
       Mixed result set returned by <B
CLASS="function"
>sesam_fetch_result()</B
>
      </B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><THEAD
><TR
><TH
ALIGN="LEFT"
VALIGN="MIDDLE"
>Array Element</TH
><TH
ALIGN="LEFT"
VALIGN="MIDDLE"
>Contents</TH
></TR
></THEAD
><TBODY
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>int $arr["count"]</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	  number of columns in result set (or zero if this was an
	  "immediate" query)
	 </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>int $arr["rows"]</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	  number of rows in result set (between zero and
	  <TT
CLASS="parameter"
><I
>max_rows</I
></TT
>)
	 </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>bool $arr["truncated"]</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	  <TT
CLASS="constant"
><B
>TRUE</B
></TT
> if the number of rows was at least
	  <TT
CLASS="parameter"
><I
>max_rows</I
></TT
>, <TT
CLASS="constant"
><B
>FALSE</B
></TT
>
	  otherwise. Note that even when this is
	  <TT
CLASS="constant"
><B
>TRUE</B
></TT
>, the next
	  <B
CLASS="function"
>sesam_fetch_result()</B
> call may return zero
	  rows because there are no more result entries.
	 </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>mixed $arr[col][row]</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	  result data for all the fields at
	  row(<TT
CLASS="literal"
>row</TT
>) and
	  column(<TT
CLASS="literal"
>col</TT
>), (where the integer index
	  <TT
CLASS="literal"
>row</TT
> is between 0 and
	  <TT
CLASS="literal"
>$arr["rows"]-1</TT
>, and
	  <TT
CLASS="literal"
>col</TT
> is between 0 and
	  <TT
CLASS="literal"
>$arr["count"]-1</TT
>). Fields may be empty, so
	  you must check for the existence of a field by using the php
	  <A
HREF="function.isset.html"
><B
CLASS="function"
>isset()</B
></A
> function. The type of the
	  returned fields depend on the respective SQL type declared
	  for its column (see <A
HREF="ref.sesam.html"
>SESAM
	  overview</A
> for the conversions applied). SESAM
	  "multiple fields" are "inlined" and treated like a sequence
	  of columns.
	 </TD
></TR
></TBODY
></TABLE
></DIV
>
     Note that the amount of memory used up by a large query may be
     gigantic. Use the <TT
CLASS="parameter"
><I
>max_rows</I
></TT
> parameter to
     limit the maximum number of rows returned, unless you are
     absolutely sure that your result will not use up all available
     memory.
    </P
><P
>&#13;     See also: <A
HREF="function.sesam-fetch-row.html"
><B
CLASS="function"
>sesam_fetch_row()</B
></A
>, and
     <A
HREF="function.sesam-field-array.html"
><B
CLASS="function"
>sesam_field_array()</B
></A
> to check for "multiple
     fields". See the description of the
     <A
HREF="function.sesam-query.html"
><B
CLASS="function"
>sesam_query()</B
></A
> function for a complete example
     using <B
CLASS="function"
>sesam_fetch_result()</B
>.
    </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.sesam-fetch-array.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.sesam-fetch-row.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>sesam_fetch_array</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.sesam.html"
ACCESSKEY="U"
>Subir</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>sesam_fetch_row</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>