mirror of
https://github.com/php/doc-it.git
synced 2026-03-24 07:32:12 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@317864 c90b9560-bf6c-de11-be94-00142212c4b1
133 lines
3.4 KiB
XML
133 lines
3.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- EN-Revision: n/a Maintainer: fernando Status: ready -->
|
|
<!-- CREDITS: calandra -->
|
|
<!-- splitted from ./it/functions/dbase.xml, last change in rev 1.2 -->
|
|
|
|
<refentry xml:id="function.dbase-create" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>dbase_create</refname>
|
|
<refpurpose>Crea un database dBase</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descrizione</title>
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>dbase_create</methodname>
|
|
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
|
<methodparam><type>array</type><parameter>fields</parameter></methodparam>
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
<function>dBase_create</function>crea un database dBase nel file<parameter>filename</parameter>
|
|
con i campi<parameter>fields</parameter>
|
|
</para>
|
|
|
|
<para>
|
|
Il parametro <parameter>fields</parameter> è un array di arrays,
|
|
ciascun array descrive il formato di un campo nel database. Ogni campo
|
|
consiste di un nome, un carattere che indica il tipo di campo, una
|
|
lunghezza, e una precisione.
|
|
</para>
|
|
<para>
|
|
I tipi di campo disponibili sono:
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term>L</term>
|
|
<listitem>
|
|
<simpara>
|
|
Boolean. Questi non hanno una lunghezza o una precisione.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>M</term>
|
|
<listitem>
|
|
<simpara>
|
|
Memo. (Nota che non sono supportati da PHP.) Questi non hanno una
|
|
lunghezza o una precisione.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>D</term>
|
|
<listitem>
|
|
<simpara>
|
|
Date (memorizzate nel formato YYYYMMDD). Questi non hanno una lunghezza o
|
|
una precisione.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>N</term>
|
|
<listitem>
|
|
<simpara>
|
|
Number. Questi hanno sia una lunghezza sia una precisione
|
|
(il numero di decimali).
|
|
</simpara>
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>C</term>
|
|
<listitem>
|
|
<simpara>
|
|
String.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
<para>
|
|
Se il database è creato con successo, viene restituito un dbase_identifier, altrimenti viene restituito
|
|
&false;.
|
|
<example>
|
|
<title>Creare un file di database dBase</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// "database" name
|
|
$dbname = "/tmp/test.dbf";
|
|
|
|
// database "definition"
|
|
$def =
|
|
array(
|
|
array("date", "D"),
|
|
array("name", "C", 50),
|
|
array("age", "N", 3, 0),
|
|
array("email", "C", 128),
|
|
array("ismember", "L")
|
|
);
|
|
|
|
// creation
|
|
if (!dbase_create($dbname, $def))
|
|
echo "<strong>Error!</strong>";
|
|
|
|
?>
|
|
]]>
|
|
</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:"~/.phpdoc/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
|
|
-->
|