mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-30 04:42:24 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@177341 c90b9560-bf6c-de11-be94-00142212c4b1
75 lines
2.3 KiB
XML
Executable File
75 lines
2.3 KiB
XML
Executable File
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.3 $ -->
|
|
<!-- EN-Revision: 1.6 Maintainer: didou Status: ready -->
|
|
<refentry id="function.sqlite-factory">
|
|
<refnamediv>
|
|
<refname>sqlite_factory</refname>
|
|
<refpurpose>
|
|
Ouvre une base SQLite et crée un objet pour elle
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>SQLiteDatabase</type><methodname>sqlite_factory</methodname>
|
|
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter role="reference">error_message</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Retourne un objet SQLiteDatabase en cas de succès, &null; si une erreur survient.
|
|
</para>
|
|
<para>
|
|
<function>sqlite_factory</function> fonctionne de la même façon que
|
|
<function>sqlite_open</function> dans le fait qu'il ouvre une base de données
|
|
SQLite ou tente de la créer si elle n'existe pas. Cependant, un objet
|
|
<link linkend="sqlite.class.sqlitedatabase">SQLiteDatabase</link> est retourné
|
|
plutôt qu'une ressource. Lisez la page de référence sur
|
|
<function>sqlite_open</function> pour son utilisation.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>sqlite_factory</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$dbhandle = sqlite_factory('sqlitedb');
|
|
$dbhandle->query('SELECT user_id, username FROM users');
|
|
|
|
/* équivalent dans les fonctionnalités à : */
|
|
|
|
$dbhandle = new SQLiteDatabase('sqlitedb');
|
|
$dbhandle->query('SELECT user_id, username FROM users');
|
|
|
|
?>]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
Voir aussi
|
|
<function>sqlite_open</function> et
|
|
<function>sqlite_popen</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
|
|
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
|
|
-->
|