php man page for sqlite_popen

Query: sqlite_popen

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

SQLITE_POPEN(3) 														   SQLITE_POPEN(3)

sqlite_popen - Opens a persistent handle to an SQLite database and create the database if it does not exist

SYNOPSIS
resource sqlite_popen (string $filename, [int $mode = 0666], [string &$error_message])
DESCRIPTION
This function behaves identically to sqlite_open(3) except that is uses the persistent resource mechanism of PHP. For information about the meaning of the parameters, read the sqlite_open(3) manual page. sqlite_popen(3) will first check to see if a persistent handle has already been opened for the given $filename. If it finds one, it returns that handle to your script, otherwise it opens a fresh handle to the database. The benefit of this approach is that you don't incur the performance cost of re-reading the database and index schema on each page hit served by persistent web server SAPI's (any SAPI except for regular CGI or CLI). Note If you use persistent handles and have the database updated by a background process (perhaps via a crontab), and that process re- creates the database by overwriting it (either by unlinking and rebuilding, or moving the updated version to replace the current version), you may experience undefined behaviour when a persistent handle on the old version of the database is recycled. To avoid this situation, have your background processes open the same database file and perform their updates in a transaction.
PARAMETERS
o $filename - The filename of the SQLite database. If the file does not exist, SQLite will attempt to create it. PHP must have write permis- sions to the file if data is inserted, the database schema is modified or to create the database if it does not exist. o $mode - The mode of the file. Intended to be used to open the database in read-only mode. Presently, this parameter is ignored by the sqlite library. The default value for mode is the octal value 0666 and this is the recommended value. o $error_message - Passed by reference and is set to hold a descriptive error message explaining why the database could not be opened if there was an error.
RETURN VALUES
Returns a resource (database handle) on success, FALSE on error.
SEE ALSO
sqlite_open(3), sqlite_close(3), sqlite_factory(3). PHP Documentation Group SQLITE_POPEN(3)
Related Man Pages
xrmgetstringdatabase(3x11) - ultrix
xrmmergedatabases(3x11) - ultrix
pg_lo_create(3) - php
sqlite_create_function(3) - php
wiki::toolkit::setup::sqlite(3pm) - debian
Similar Topics in the Unix Linux Community
sqlite database in HP-UX vs Linux
Evaluated variables in PHP
Several processes writing to an SQLite database at the same time
Why am I persistent to be WRONG!
Script to check the health of a database