<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >sesam_fetch_result</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do 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=UTF-8"></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 do 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" >Próxima</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="AEN202059" ></A ><P > (PHP 3 CVS only)</P >sesam_fetch_result -- Return all or part of a query result</DIV ><DIV CLASS="refsect1" ><A NAME="AEN202062" ></A ><H2 >Descrição</H2 >mixed <B CLASS="methodname" >sesam_fetch_result</B > ( string result_id [, int max_rows] )<BR ></BR ><P > Fetches a result, optionally limited to <CODE CLASS="parameter" >max_rows</CODE >. </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN202075" ></A ><H2 >Parâmetros</H2 ><P > <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><CODE CLASS="parameter" >result_id</CODE ></DT ><DD ><P > A valid result id returned by <A HREF="function.sesam-query.html" ><B CLASS="function" >sesam_query()</B ></A >. </P ></DD ><DT ><CODE CLASS="parameter" >max_rows</CODE ></DT ><DD ><P > Note that the amount of memory used up by a large query may be gigantic. Use the <CODE CLASS="parameter" >max_rows</CODE > 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 ></DD ></DL ></DIV > </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN202091" ></A ><H2 >Valores de retornado</H2 ><P > Returns a mixed array with the query result entries, optionally limited to a maximum of <CODE CLASS="parameter" >max_rows</CODE > rows. Note that both row and column indexes are zero-based. <DIV CLASS="table" ><A NAME="AEN202095" ></A ><P ><B >Tabela 1. Mixed result set returned by <B CLASS="function" >sesam_fetch_result()</B > </B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Array Element</TH ><TH >Contents</TH ></TR ></THEAD ><TBODY ><TR ><TD >int $arr["count"]</TD ><TD > number of columns in result set (or zero if this was an "immediate" query) </TD ></TR ><TR ><TD >int $arr["rows"]</TD ><TD > number of rows in result set (between zero and <CODE CLASS="parameter" >max_rows</CODE >) </TD ></TR ><TR ><TD >bool $arr["truncated"]</TD ><TD > <TT CLASS="constant" ><B >TRUE</B ></TT > if the number of rows was at least <CODE CLASS="parameter" >max_rows</CODE >, <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 >mixed $arr[col][row]</TD ><TD > 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 > </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN202130" ></A ><H2 >Veja também</H2 ><P > <P ></P ><TABLE BORDER="0" ><TBODY ><TR ><TD ><A HREF="function.sesam-fetch-array.html" ><B CLASS="function" >sesam_fetch_array()</B ></A ></TD ></TR ><TR ><TD ><A HREF="function.sesam-fetch-row.html" ><B CLASS="function" >sesam_fetch_row()</B ></A ></TD ></TR ><TR ><TD ><A HREF="function.sesam-query.html" ><B CLASS="function" >sesam_query()</B ></A ></TD ></TR ></TBODY ></TABLE ><P ></P > </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" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.sesam-fetch-row.html" ACCESSKEY="N" >Próxima</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" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >sesam_fetch_row</TD ></TR ></TABLE ></DIV ></BODY ></HTML >