<HTML ><HEAD ><TITLE >sesam_num_fields</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_free_result" HREF="function.sesam-free-result.html"><LINK REL="NEXT" TITLE="sesam_query" HREF="function.sesam-query.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-free-result.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-query.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.sesam-num-fields" ></A >sesam_num_fields</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN69530" ></A ><P > (PHP 3 CVS only)</P >sesam_num_fields -- Return the number of fields/columns in a result set </DIV ><DIV CLASS="refsect1" ><A NAME="AEN69533" ></A ><H2 >Description</H2 >int <B CLASS="methodname" >sesam_num_fields</B > ( string result_id)<BR ></BR ><P > After calling <A HREF="function.sesam-query.html" ><B CLASS="function" >sesam_query()</B ></A > with a "select type" query, this function gives you the number of columns in the result. Returns an integer describing the total number of columns (aka. fields) in the current <TT CLASS="parameter" ><I >result_id</I ></TT > result set or <TT CLASS="constant" ><B >FALSE</B ></TT > on error. </P ><P > For "immediate" statements, the value zero is returned. The SESAM "multiple field" columns count as their respective dimension, i.e., a three-column "multiple field" counts as three columns. </P ><P > See also: <A HREF="function.sesam-query.html" ><B CLASS="function" >sesam_query()</B ></A > and <A HREF="function.sesam-field-array.html" ><B CLASS="function" >sesam_field_array()</B ></A > for a way to distinguish between "multiple field" columns and regular columns. </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-free-result.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-query.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >sesam_free_result</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_query</TD ></TR ></TABLE ></DIV ></BODY ></HTML >