Sophie

Sophie

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

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

<HTML
><HEAD
><TITLE
>fbsql_list_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="FrontBase Functions"
HREF="ref.fbsql.html"><LINK
REL="PREVIOUS"
TITLE="fbsql_list_dbs"
HREF="function.fbsql-list-dbs.html"><LINK
REL="NEXT"
TITLE="fbsql_list_tables"
HREF="function.fbsql-list-tables.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.fbsql-list-dbs.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.fbsql-list-tables.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.fbsql-list-fields"
></A
>fbsql_list_fields</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN18165"
></A
><P
>    (PHP 4 &#62;= 4.0.6)</P
>fbsql_list_fields&nbsp;--&nbsp;List FrontBase result fields</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN18168"
></A
><H2
>Description</H2
>resource <B
CLASS="methodname"
>fbsql_list_fields</B
> ( string database_name, string table_name [, resource link_identifier])<BR
></BR
><P
>&#13;     <B
CLASS="function"
>fbsql_list_fields()</B
> retrieves information
     about the given tablename. Arguments are the database name and
     the table name. A result pointer is returned which can be used
     with <A
HREF="function.fbsql-field-flags.html"
><B
CLASS="function"
>fbsql_field_flags()</B
></A
>,
     <A
HREF="function.fbsql-field-len.html"
><B
CLASS="function"
>fbsql_field_len()</B
></A
>,
     <A
HREF="function.fbsql-field-name.html"
><B
CLASS="function"
>fbsql_field_name()</B
></A
>, and
     <A
HREF="function.fbsql-field-type.html"
><B
CLASS="function"
>fbsql_field_type()</B
></A
>.
    </P
><P
>&#13;     A result identifier is a positive integer. The function returns
     <TT
CLASS="constant"
><B
>FALSE</B
></TT
> if an error occurs. A string describing the error will be
     placed in <TT
CLASS="literal"
>$phperrmsg</TT
>, and unless the function
     was called as <TT
CLASS="literal"
>@fbsql()</TT
> then this error string
     will also be printed out.
    </P
><P
>&#13;     <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN18193"
></A
><P
><B
>Ejemplo 1. <B
CLASS="function"
>fbsql_list_fields()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>$link = fbsql_connect('localhost', 'myname', 'secret');

$fields = fbsql_list_fields("database1", "table1", $link);
$columns = fbsql_num_fields($fields);

for ($i = 0; $i &#60; $columns; $i++) {
    echo fbsql_field_name($fields, $i) . "\n";;
}</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
    </P
><P
>&#13;     The above example would produce the following output:
     <DIV
CLASS="informalexample"
><A
NAME="AEN18198"
></A
><P
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="programlisting"
>field1
field2
field3
...</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
>
    </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.fbsql-list-dbs.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.fbsql-list-tables.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>fbsql_list_dbs</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.fbsql.html"
ACCESSKEY="U"
>Subir</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>fbsql_list_tables</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>