<?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/ibase.xml, last change in rev 1.12 --> <refentry id="function.ibase-num-fields"> <refnamediv> <refname>ibase_num_fields</refname> <refpurpose>Get the number of fields in a result set</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>ibase_num_fields</methodname> <methodparam><type>resource</type><parameter>result_id</parameter></methodparam> </methodsynopsis> <para> Returns an integer containing the number of fields in a result set. <informalexample> <programlisting role="php"> <![CDATA[ <?php $rs = ibase_query("SELECT * FROM tablename"); $coln = ibase_num_fields($rs); for ($i = 0; $i < $coln; $i++) { $col_info = ibase_field_info($rs, $i); echo "name: " . $col_info['name'] . "\n"; echo "alias: " . $col_info['alias'] . "\n"; echo "relation: " . $col_info['relation'] . "\n"; echo "length: " . $col_info['length'] . "\n"; echo "type: " . $col_info['type'] . "\n"; } ?> ]]> </programlisting> </informalexample> </para> <para> See also: <function>ibase_field_info</function>. </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 -->