CXLIII. SQLite Functions (PDO_SQLITE)

Введение

PDO_SQLITE is a driver that implements the PHP Data Objects (PDO) interface to enable access to SQLite 3 databases.

In PHP 5.1, the SQLite extension also provides a driver for SQLite 2 databases; while it is not technically a part of the PDO_SQLITE driver, it behaves similarly, so it is documented alongside it. The SQLite 2 driver for PDO is provided primarily to make it easier to import legacy sqlite 2 database files into an application that uses the faster, more efficient sqlite 3 driver. As a result, the SQLite 2 driver is not as feature-rich as the SQLite 3 driver.

Содержание
PDO_SQLITE DSN -- Connecting to SQLite databases
PDO::sqliteCreateAggregate --  Registers an aggregating User Defined Function for use in SQL statements
PDO::sqliteCreateFunction --  Registers a User Defined Function for use in SQL statements


SQLite Functions (PDO_SQLITE)
Duffalo
06-Jul-2006 04:41
Note that as of the date of this post, PDO_SQLITE will not interact with database files created with the current version of the SQLite console application, sqlite-3.3.6.

It is currently necessary to obtain version 3.2.8, available from http://www.sqlite.org/ but only by entering the URI manually, as there is no link. Go to http://www.sqlite.org/download.html and find the URI of the version you're looking for, then make the appropriate version number substitution.
aidan at php dot net
01-Oct-2005 02:36
If you receive an error while trying to write to a sqlite database (update, delete, drop):

Warning: PDO::query() [function.query]: SQLSTATE[HY000]: General error: 1 unable to open database

The folder that houses the database file must be writeable.

<sqlite_validPDO_SQLITE DSN>
 Last updated: Tue, 15 Nov 2005