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.4 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/dbase.xml, last change in rev 1.2 -->
|
|
|
|
<refentry id="function.dbase-numfields">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>dbase_numfields</refname>
|
|
|
|
<refpurpose>
|
|
|
|
Find out how many fields are in a dBase database
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>int</type><methodname>dbase_numfields</methodname>
|
|
|
|
<methodparam><type>int</type><parameter>dbase_identifier</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
Returns the number of fields (columns) in the specified
|
|
|
|
database. Field numbers are between 0 and dbase_numfields($db)-1,
|
|
|
|
while record numbers are between 1 and dbase_numrecords($db).
|
|
|
|
<example>
|
|
|
|
<title>Using <function>dbase_numfields</function></title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
2003-07-16 17:25:02 +00:00
|
|
|
<?php
|
|
|
|
|
2002-04-15 00:12:54 +00:00
|
|
|
$rec = dbase_get_record($db, $recno);
|
|
|
|
$nf = dbase_numfields($db);
|
|
|
|
for ($i=0; $i < $nf; $i++) {
|
2003-12-15 16:55:22 +00:00
|
|
|
echo $rec[$i]."<br />\n";
|
2002-04-15 00:12:54 +00:00
|
|
|
}
|
2003-07-16 17:25:02 +00:00
|
|
|
|
|
|
|
?>
|
2002-04-15 00:12:54 +00:00
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</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
|
|
|
|
-->
|