PEAR Handbuch
Zurück
Nach vorne
III. PEAR DB: a unified API for accessing SQL-databases
This chapter describes how to use the PEAR database abstraction layer.
Inhaltsverzeichnis
DSN
-- The data source name
Connect
-- Connecting and disconnecting
Query
-- Performing a query against a database.
Fetch
-- Fetching rows from the query
Sequences
-- Database sequences
Execute
-- Prepare & Execute/ExecuteMultiple
DB::connect()
-- Create a new DB connection object and connect to the specified database
DB::disconnect()
-- Log out and disconnect from the database.
DB::isWarning()
-- Tell whether a result code from a DB method is a warning.
DB::isError()
-- Tell whether a result code from a DB method is an error.
DB::quote()
-- Quotes a string so it can be safely used in a query
DB::provides()
-- Tell whether a DB implementation or its backend extension supports a given feature.
DB::setFetchMode()
-- Sets which fetch mode should be used by default on queries on the connection.
DB::prepare()
-- Prepares a query for multiple execution with execute().
DB::autoPrepare()
-- Build automaticaly an insert or an update sql query and call prepare() with it.
DB::execute()
-- Executes a prepared SQL query
DB::executeMultiple()
-- Several executes a prepared SQL query
DB::query()
-- Send a query to the database
DB::limitQuery()
-- Generates a limited query
EXPERIMENTAL!
DB::getOne()
-- Fetch the first column of the first row from a query
DB::getRow()
-- Fetch the first row from a query
DB::getCol()
-- Fetch a single column from a query
DB::getAssoc()
-- Fetch the result set as an associative array using the first column as the key.
DB::getAll()
-- Fetch all the rows returned from a query.
DB::affectedRows()
-- returns the affected rows of a query
DB::nextId()
-- returns the next free id of a sequence
DB::createSequence()
-- creates a new sequence
DB::dropSequence()
-- deletes a sequence
DB::getListOf()
-- list internal DB info
DB_Result
-- contains the result of a database query
DB_Result::fetchRow()
-- Fetch and return a row of data
DB_Result::fetchInto()
-- Fetch a row of data into an existing variable.
DB_Result::numCols()
-- Get the the number of columns in a result set.
DB_Result::numRows()
-- Get the the number of rows in a result set.
DB_Result::nextResult()
-- Get the next result if a batch of queries was executed.
DB_Result::free()
-- Frees the resources allocated for this result set.
DB_Result::tableInfo()
-- returns meta data about the result set
DB_Error
-- Class for reporting portable database error messages.
DB_Warning
-- Class for reporting portable database warning messages.
Zurück
Zum Anfang
Nach vorne
Console_Getopt
Nach oben
DSN