mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-21 11:28:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@103049 c90b9560-bf6c-de11-be94-00142212c4b1
87 lines
2.6 KiB
XML
87 lines
2.6 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<!-- splitted from ./en/functions/fbsql.xml, last change in rev 1.1 -->
|
|
<refentry id="function.fbsql-list-fields">
|
|
<refnamediv>
|
|
<refname>fbsql_list_fields</refname>
|
|
<refpurpose>List FrontBase result fields</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>resource</type><methodname>fbsql_list_fields</methodname>
|
|
<methodparam><type>string</type><parameter>database_name</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>table_name</parameter></methodparam>
|
|
<methodparam choice="opt"><type>resource</type><parameter>
|
|
link_identifier
|
|
</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>fbsql_list_fields</function> 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 <function>fbsql_field_flags</function>,
|
|
<function>fbsql_field_len</function>,
|
|
<function>fbsql_field_name</function>, and
|
|
<function>fbsql_field_type</function>.
|
|
</para>
|
|
<para>
|
|
A result identifier is a positive integer. The function returns
|
|
&false; if an error occurs. A string describing the error will be
|
|
placed in <literal>$phperrmsg</literal>, and unless the function
|
|
was called as <literal>@fbsql()</literal> then this error string
|
|
will also be printed out.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>fbsql_list_fields</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
$link = fbsql_connect('localhost', 'myname', 'secret');
|
|
|
|
$fields = fbsql_list_fields("database1", "table1", $link);
|
|
$columns = fbsql_num_fields($fields);
|
|
|
|
for ($i = 0; $i < $columns; $i++) {
|
|
echo fbsql_field_name($fields, $i) . "\n";;
|
|
}
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
The above example would produce the following output:
|
|
<informalexample>
|
|
<programlisting>
|
|
<![CDATA[
|
|
field1
|
|
field2
|
|
field3
|
|
...
|
|
]]>
|
|
</programlisting>
|
|
</informalexample>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|