mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 10:28:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@179595 c90b9560-bf6c-de11-be94-00142212c4b1
141 lines
4.1 KiB
XML
141 lines
4.1 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.7 $ -->
|
|
<reference id="ref.dbase">
|
|
<title>dBase Functions</title>
|
|
<titleabbrev>dBase</titleabbrev>
|
|
|
|
<partintro>
|
|
<section id="dbase.intro">
|
|
&reftitle.intro;
|
|
<para>
|
|
These functions allow you to access records stored in dBase-format
|
|
(dbf) databases.
|
|
</para>
|
|
<para>
|
|
dBase files are simple sequential files of fixed length records.
|
|
Records are appended to the end of the file and delete records are
|
|
kept until you call <function>dbase_pack</function>.
|
|
</para>
|
|
<para>
|
|
The types of dBase fields available are:
|
|
<table>
|
|
<title>Available types of fields</title>
|
|
<tgroup cols="3">
|
|
<thead>
|
|
<row>
|
|
<entry>Field</entry>
|
|
<entry>dBase Type</entry>
|
|
<entry>Format</entry>
|
|
<entry>Additional informations</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><literal>M</literal></entry>
|
|
<entry>Memo</entry>
|
|
<entry>n/a</entry>
|
|
<entry>This type is not supported by PHP, such field will be ignored</entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>D</literal></entry>
|
|
<entry>Date</entry>
|
|
<entry><literal>YYYYMMDD</literal></entry>
|
|
<entry>The field length is limited to 8</entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>N</literal></entry>
|
|
<entry>Number</entry>
|
|
<entry>A number</entry>
|
|
<entry>
|
|
You must declare a length and a precision (the number of digits
|
|
after the decimal point)
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>C</literal></entry>
|
|
<entry>String</entry>
|
|
<entry>A string</entry>
|
|
<entry>You must declare a length. When retrieving data, the string
|
|
will be right-padded with spaces to fit the declared length.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>L</literal></entry>
|
|
<entry>Boolean</entry>
|
|
<entry><literal>T</literal> or <literal>Y</literal> for &true;,
|
|
<literal>F</literal> or <literal>N</literal> for &false;</entry>
|
|
<entry>Stored and returned as an integer (1 or 0)</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
<warning>
|
|
<para>
|
|
There is no support for indexes or memo fields. There is no
|
|
support for locking, too. Two concurrent webserver processes
|
|
modifying the same dBase file will very likely ruin your database.
|
|
</para>
|
|
<para>
|
|
We recommend that you do not use dBase files as your production
|
|
database. Choose any real SQL server instead; <ulink
|
|
url="&url.mysql;">MySQL</ulink> or <ulink url="&url.pgsql;">Postgres</ulink>
|
|
are common choices with PHP. dBase support is here to allow you to
|
|
import and export data to and from your web database, because the
|
|
file format is commonly understood by Windows spreadsheets and
|
|
organizers.
|
|
</para>
|
|
</warning>
|
|
</section>
|
|
|
|
&reference.dbase.configure;
|
|
|
|
<section id="dbase.runtime">
|
|
&reftitle.runtime;
|
|
&no.config;
|
|
</section>
|
|
|
|
<section id="dbase.resources">
|
|
&reftitle.resources;
|
|
&no.resource;
|
|
</section>
|
|
|
|
<section id="dbase.examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
Many examples in this reference require a dBase database. We will use
|
|
<filename>/tmp/test.dbf</filename> that will be created in the example of
|
|
<function>dbase_create</function>.
|
|
</para>
|
|
</section>
|
|
|
|
<section id="dbase.constants">
|
|
&reftitle.constants;
|
|
&no.constants;
|
|
</section>
|
|
|
|
</partintro>
|
|
|
|
&reference.dbase.functions;
|
|
|
|
</reference>
|
|
<!-- 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
|
|
-->
|
|
|