2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2003-12-15 16:55:22 +00:00
|
|
|
<!-- $Revision: 1.5 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- 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>
|
2003-07-27 22:21:30 +00:00
|
|
|
<methodparam><type>resource</type><parameter>result_id</parameter></methodparam>
|
2002-04-15 00:12:54 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
Returns an integer containing the number of fields in a result
|
|
|
|
set.
|
|
|
|
<informalexample>
|
|
|
|
<programlisting role="php">
|
2003-07-27 22:21:30 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
2003-09-01 16:58:05 +00:00
|
|
|
$rs = ibase_query("SELECT * FROM tablename");
|
|
|
|
$coln = ibase_num_fields($rs);
|
|
|
|
for ($i = 0; $i < $coln; $i++) {
|
|
|
|
$col_info = ibase_field_info($rs, $i);
|
2003-12-15 16:55:22 +00:00
|
|
|
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";
|
2003-07-27 22:21:30 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
]]>
|
2002-04-15 00:12:54 +00:00
|
|
|
</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
|
|
|
|
-->
|