reference/pdo_sqlite/reference.xml
8d1ee58c3e2221d58050f162ec909cbe6d00cbaf
...
...
@@ -13,16 +13,6 @@
13
13
PDO_SQLITE is a driver that implements the <link linkend="intro.pdo">PHP
14
14
Data Objects (PDO) interface</link> to enable access to SQLite 3 databases.
15
15
</para>
16
-
<para>
17
-
In PHP 5.1, the <link linkend="ref.sqlite">SQLite</link> extension also
18
-
provides a driver for SQLite 2 databases; while it is not technically a
19
-
part of the PDO_SQLITE driver, it behaves similarly, so it is
20
-
documented alongside it. The SQLite 2 driver for PDO is provided
21
-
primarily to make it easier to import legacy SQLite 2 database files into
22
-
an application that uses the faster, more efficient SQLite 3 driver. As
23
-
a result, the SQLite 2 driver is not as feature-rich as the SQLite 3
24
-
driver.
25
-
</para>
26
16
<note>
27
17
<para>
28
18
PDO_SQLITE allows using strings apart from streams together with
...
...
@@ -54,57 +44,26 @@
54
44
<itemizedlist>
55
45
<listitem>
56
46
<para>
57
-
To access a database on disk, append the absolute path to the
47
+
To access a database on disk, the absolute path has to be appended to the
58
48
DSN prefix.
59
49
</para>
60
50
</listitem>
61
51
<listitem>
62
52
<para>
63
-
To create a database in memory, append <literal>:memory:</literal>
53
+
To create a database in memory, <literal>:memory:</literal> has to be appended
64
54
to the DSN prefix.
65
55
</para>
66
56
</listitem>
67
-
</itemizedlist>
68
-
</para>
69
-
</listitem>
70
-
</varlistentry>
71
-
<varlistentry>
72
-
<term>DSN prefix (SQLite 2)</term>
73
-
<listitem>
74
-
<para>
75
-
The <link linkend="ref.sqlite">SQLite</link> extension in
76
-
PHP 5.1 provides a PDO driver that supports accessing and creating SQLite 2
77
-
databases. This enables you to access databases you may have created
78
-
with the <link linkend="ref.sqlite">SQLite</link> extension in
79
-
previous versions of PHP.
80
-
</para>
81
-
<note>
82
-
<para>
83
-
The sqlite2 driver is only available in PHP 5.1.x if you have enabled
84
-
both PDO and ext/sqlite. It is not currently available via PECL.
85
-
</para>
86
-
</note>
87
-
<para>
88
-
The DSN prefix for connecting to SQLite 2 databases is
89
-
<userinput>sqlite2:</userinput>.
90
-
<itemizedlist>
91
57
<listitem>
92
58
<para>
93
-
To access a database on disk, append the absolute path to the
94
-
DSN prefix.
95
-
</para>
96
-
</listitem>
97
-
<listitem>
98
-
<para>
99
-
To create a database in memory, append <literal>:memory:</literal>
100
-
to the DSN prefix.
59
+
If the DSN consists of the DSN prefix only, a temporary database is used,
60
+
which is deleted when the connection is closed.
101
61
</para>
102
62
</listitem>
103
63
</itemizedlist>
104
64
</para>
105
65
</listitem>
106
66
</varlistentry>
107
-

108
67
</variablelist>
109
68
</para>
110
69
</refsect1>
...
...
@@ -120,8 +79,7 @@
120
79
<![CDATA[
121
80
sqlite:/opt/databases/mydb.sq3
122
81
sqlite::memory:
123
-
sqlite2:/opt/databases/mydb.sq2
124
-
sqlite2::memory:
82
+
sqlite:
125
83
]]>
126
84
</programlisting>
127
85
</para>
128
86