Chapter 20. Database

Table of Contents
DB
DB_DataObject

Provides database-related Packages

DB

Table of Contents
Introduction - DSN -- The Data Source Name
Introduction - Connect -- Connecting and disconnecting a database
Introduction - Query -- Performing a query against a database.
Introduction - Fetch -- Fetching rows from the query
Introduction - Sequences -- Database sequences
Introduction - Execute -- Prepare & Execute/ExecuteMultiple
Introduction - autoPrepare and autoExecute -- autoPrepare and autoExecute
DB -- Main class
DB::connect() -- connects to database
DB::isWarning() -- checks for a warning
DB::isError() -- checks for an error
DB_Common -- Interface for database access
DB_Common::affectedRows() -- Number of affected rows
DB_Common::autoExecute() -- Make automaticaly an insert or update query
DB_Common::autoPrepare() -- Build automaticaly an insert or an update sql query
DB_Common::createSequence() -- create a new sequence
DB_Common::disconnect() -- disconnect from a database
DB_Common::dropSequence() -- deletes a sequence
DB_Common::execute() -- executes a prepared SQL statment
DB_Common::executeMultiple() -- repeated execution of a prepared SQL statment
DB_Common::getAll() -- Fetch all rows
DB_Common::getAssoc() -- fetch result set as associative array
DB_Common::getCol() -- Fetch a single column
DB_Common::getListOf() -- view database system information
DB_Common::getOne() -- fetch the first column of the first row
DB_Common::getRow() -- fetch the first row
DB_Common::limitQuery() -- send a limited query to the database
DB_Common::nextId() -- returns the next free id of a sequence
DB_Common::prepare() -- prepares a SQL statment
DB_Common::provides() -- checks for a feature
DB_Common::query() -- send a query to the database
DB_Common::quote() -- quotes a string
DB_Common::setFetchMode() -- sets the default fetch mode
DB_Result -- contains a result set
DB_Result::fetchInto() -- fetch a row into a variable
DB_Result::fetchRow() -- fetch a row
DB_Result::free() -- delete the result set
DB_Result::nextResult() -- get result sets of multiple queries
DB_Result::numCols() -- get number of columns
DB_Result::numRows() -- get number of row
DB_Error -- DB Error object
DB_Warning -- DB Warning object

An unified API for accessing SQL-databases