Class: DB_sqlite
Source Location: /DB-1.9.2/DB/sqlite.php
PEAR
|
--DB_common
|
--DB_sqlite
The methods PEAR DB uses to interact with PHP's sqlite extension for interacting with SQLite databases
Author(s):
Version:
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
__construct (Constructor) [line 159]
This constructor calls parent::__construct()
Overrides DB_common::__construct() (This constructor calls $this->PEAR('DB_Error'))
affectedRows [line 478]
Determines the number of rows affected by a data maniuplation query - is returned for queries that don't manipulate data.
Overrides DB_common::affectedRows() (Determines the number of rows affected by a data maniuplation query)
connect [line 196]
int connect(
array
$dsn, [bool
$persistent = false])
|
|
Connect to the database server, log in and open the database Don't call this method directly. Use DB::connect() instead. PEAR DB's sqlite driver supports the following extra DSN options: - mode The permissions for the database file, in four digit
chmod octal format (eg "0600").
Example of connecting to a database in read-only mode: require_once 'DB.php';
$dsn = 'sqlite:///path/and/name/of/db/file?mode=0400';
$options = array(
);
if (PEAR::isError($db)) {
die($db->getMessage());
}
Parameters:
createSequence [line 511]
int createSequence(
string
$seq_name)
|
|
Creates a new sequence
Overrides DB_common::createSequence() (Creates a new sequence)
Parameters:
disconnect [line 260]
Disconnects from the database server
dropSequence [line 496]
errorCode [line 739]
integer errorCode(
string
$errormsg)
|
|
Determines PEAR::DB error code from the database's text error message
Overrides DB_common::errorCode() (Maps native error codes to DB's portable ones)
Parameters:
errorNative [line 724]
Gets the DBMS' native error message produced by the last query
Overrides DB_common::errorNative() (Gets the DBMS' native error code produced by the last query)
escapeSimple [line 628]
string escapeSimple(
string
$str)
|
|
Escapes a string according to the current DBMS's standards In SQLite, this makes things safe for inserts/updates, but may cause problems when performing text comparisons against columns containing binary data. See the PHP manual for more info.
Overrides DB_common::escapeSimple() (Escapes a string according to the current DBMS's standards)
Parameters:
fetchInto [line 350]
mixed fetchInto(
resource
$result,
&$arr, int
$fetchmode, [int
$rownum = null], array
$arr)
|
|
Places a row from the result set into the given array Formating of the array and the data therein are configurable. See DB_result::fetchInto() for more information. This method is not meant to be called directly. Use DB_result::fetchInto() instead. It can't be declared "protected" because DB_result is a separate object.
Parameters:
freeResult [line 408]
bool freeResult(
&$result, resource
$result)
|
|
Deletes the result set and frees the memory occupied by the result set This method is not meant to be called directly. Use DB_result::free() instead. It can't be declared "protected" because DB_result is a separate object.
Parameters:
getDbFileStats [line 590]
mixed getDbFileStats(
[string
$arg = ''])
|
|
Get the file stats for the current database Possible arguments are dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, blocks or a numeric key between - and 12.
Parameters:
getSpecialQuery [line 880]
string getSpecialQuery(
string
$type, [array
$args = array()])
|
|
Obtains the query string needed for listing a given type of objects
Overrides DB_common::getSpecialQuery() (Obtains the query string needed for listing a given type of objects)
Parameters:
modifyLimitQuery [line 652]
string modifyLimitQuery(
string
$query, int
$from, int
$count, [mixed
$params = array()])
|
|
Adds LIMIT clauses to a query string according to current DBMS standards
Overrides DB_common::modifyLimitQuery() (Adds LIMIT clauses to a query string according to current DBMS standards)
Parameters:
modifyQuery [line 674]
string modifyQuery(
string
$query)
|
|
Changes a query string for various DBMS specific reasons This little hack lets you know how many rows were deleted when running a "DELETE FROM table" query. Only implemented if the DB_PORTABILITY_DELETE_COUNT portability option is on.
Overrides DB_common::modifyQuery() (Changes a query string for various DBMS specific reasons)
Parameters:
nextId [line 546]
int nextId(
string
$seq_name, [boolean
$ondemand = true])
|
|
Returns the next free id in a sequence
Overrides DB_common::nextId() (Returns the next free id in a sequence)
Parameters:
nextResult [line 322]
bool nextResult(
resource
$result)
|
|
Move the internal sqlite result pointer to the next available result
Parameters:
numCols [line 434]
int numCols(
resource
$result)
|
|
Gets the number of columns in a result set This method is not meant to be called directly. Use DB_result::numCols() instead. It can't be declared "protected" because DB_result is a separate object.
Parameters:
numRows [line 459]
int numRows(
resource
$result)
|
|
Gets the number of rows in a result set This method is not meant to be called directly. Use DB_result::numRows() instead. It can't be declared "protected" because DB_result is a separate object.
Overrides DB_common::numRows() (Determines the number of rows in a query result)
Parameters:
simpleQuery [line 283]
mixed simpleQuery(
string
$query)
|
|
Sends a query to the database server NOTICE: This method needs PHP's track_errors ini setting to be on. It is automatically turned on when connecting to the database. Make sure your scripts don't turn it off.
Parameters:
sqliteRaiseError [line 700]
object the sqliteRaiseError(
[int
$errno = null])
|
|
Produces a DB_Error object regarding the current problem
Parameters:
tableInfo [line 788]
array tableInfo(
string
$result, [int
$mode = null])
|
|
Returns information about a table
Overrides DB_common::tableInfo() (Returns information about a table or a result set)
Parameters:
Documentation generated on Mon, 11 Mar 2019 16:04:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|