/DB.php

Description

Database independent query interface

PHP versions 4 and 5

LICENSE: This source file is subject to version 3.0 of the PHP license that is available through the world-wide-web at the following URI: http://www.php.net/license/3_0.txt. If you did not receive a copy of the PHP License and are unable to obtain it through the web, please send a note to license@php.net so we can mail you a copy immediately.

Classes
Class Description
DB Database independent query interface
DB_Error DB_Error implements a class for reporting portable database error messages
DB_result This class implements a wrapper for a DB result set
DB_row PEAR DB Row Object
Includes
require_once ('PEAR.php') (line 30)

Obtain the PEAR class so it can be extended from

Constants
DB_AUTOQUERY_INSERT = 1 (line 319)

The type of query to create with the automatic query building methods.

  • see: DB_common::autoPrepare(), DB_common::autoExecute()
DB_AUTOQUERY_UPDATE = 2 (line 320)

The type of query to create with the automatic query building methods.

  • see: DB_common::autoPrepare(), DB_common::autoExecute()
DB_BINMODE_CONVERT = 3 (line 241)

Converts the data to hex format before returning it

The different ways of returning binary data from queries. For example the string "123" would become "313233".

DB_BINMODE_PASSTHRU = 1 (line 229)

Sends the fetched data straight through to output

The different ways of returning binary data from queries.

DB_BINMODE_RETURN = 2 (line 234)

Lets you return data as usual

The different ways of returning binary data from queries.

DB_ERROR = -1 (line 51)

Unkown error

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_ACCESS_VIOLATION = -26 (line 171)

The present user has inadequate permissions to perform the task requestd

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_ALREADY_EXISTS = -5 (line 71)

Tried to create a duplicate object

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_CANNOT_CREATE = -15 (line 121)

Could not create the object requested

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_CANNOT_DROP = -17 (line 126)

Could not drop the database requested because it does not exist

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_CONNECT_FAILED = -24 (line 161)

Could not connect to the database

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_CONSTRAINT = -3 (line 61)

Tried to insert a duplicate value into a primary or unique index

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_CONSTRAINT_NOT_NULL = -29 (line 181)

Tried to insert a null value into a column that doesn't allow nulls

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_DIVZERO = -13 (line 111)

Attempt to divide something by zero

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_EXTENSION_NOT_FOUND = -25 (line 166)

The PHP extension needed for this DBMS could not be found

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_INVALID = -8 (line 86)

A literal submitted did not match the data type expected

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_INVALID_DATE = -12 (line 106)

A literal date submitted did not match the data type expected

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_INVALID_DSN = -23 (line 156)

The DSN submitted has problems

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_INVALID_NUMBER = -11 (line 101)

A literal number submitted did not match the data type expected

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_MISMATCH = -7 (line 81)

The number of parameters does not match the number of placeholders

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_NEED_MORE_DATA = -20 (line 141)

The data submitted to the method was inappropriate

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_NODBSELECTED = -14 (line 116)

A database needs to be selected

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_NOSUCHDB = -27 (line 176)

The database requested does not exist

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_NOSUCHFIELD = -19 (line 136)

An identifier in the query refers to a non-existant column

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_NOSUCHTABLE = -18 (line 131)

An identifier in the query refers to a non-existant table

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_NOT_CAPABLE = -9 (line 91)

The current DBMS does not support the action you attempted

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_NOT_FOUND = -4 (line 66)

An identifier in the query refers to a non-existant object

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_NOT_LOCKED = -21 (line 146)

The attempt to lock the table failed

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_SYNTAX = -2 (line 56)

Syntax error

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_TRUNCATED = -10 (line 96)

A literal submitted was too long so the end of it was removed

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_UNSUPPORTED = -6 (line 76)

The current driver does not support the action you attempted

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_ERROR_VALUE_COUNT_ON_ROW = -22 (line 151)

The number of columns doesn't match the number of values

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_FETCHMODE_ASSOC = 2 (line 268)

Column data indexed by column names

Fetch Modes.

  • see: DB_common::setFetchMode()
DB_FETCHMODE_DEFAULT = 0 (line 258)

Indicates the current default fetch mode should be used

Fetch Modes.

  • see: DB_common::$fetchmode
  • see: DB_common::setFetchMode()
DB_FETCHMODE_FLIPPED = 4 (line 282)

For multi-dimensional results, make the column name the first level of the array and put the row number in the second level of the array

Fetch Modes. This is flipped from the normal behavior, which puts the row numbers in the first level of the array and the column names in the second level.

  • see: DB_common::setFetchMode()
DB_FETCHMODE_OBJECT = 3 (line 273)

Column data as object properties

Fetch Modes.

  • see: DB_common::setFetchMode()
DB_FETCHMODE_ORDERED = 1 (line 263)

Column data indexed by numbers, ordered from 0 and up

Fetch Modes.

  • see: DB_common::setFetchMode()
DB_GETMODE_ASSOC = DB_FETCHMODE_ASSOC (line 289)

Old fetch modes. Left here for compatibility.

DB_GETMODE_FLIPPED = DB_FETCHMODE_FLIPPED (line 290)

Old fetch modes. Left here for compatibility.

DB_GETMODE_ORDERED = DB_FETCHMODE_ORDERED (line 288)

Old fetch modes. Left here for compatibility.

DB_OK = 1 (line 46)

The code returned by many methods upon success

One of PEAR DB's portable error codes.

  • see: DB_common::errorCode(), DB::errorMessage() }
DB_PARAM_MISC = 3 (line 214)

Indicates a misc (!) placeholder was used

Identifiers for the placeholders used in prepared statements. The value should not be quoted or escaped.

  • see: DB_common::prepare()
DB_PARAM_OPAQUE = 2 (line 207)

Indicates an opaque (&) placeholder was used

Identifiers for the placeholders used in prepared statements. The value presented is a file name. Extract the contents of that file and place them in this column.

  • see: DB_common::prepare()
DB_PARAM_SCALAR = 1 (line 199)

Indicates a scalar (?) placeholder was used

Identifiers for the placeholders used in prepared statements. Quote and escape the value as necessary.

  • see: DB_common::prepare()
DB_PORTABILITY_ALL = 63 (line 388)

Turn on all portability features

Portability Modes.

Bitwised constants, so they can be combined using | and removed using ^.

  • see: DB_common::setOption() }
DB_PORTABILITY_DELETE_COUNT = 4 (line 359)

Force reporting the number of rows deleted

Portability Modes.

Bitwised constants, so they can be combined using | and removed using ^.

  • see: DB_common::setOption() }
DB_PORTABILITY_ERRORS = 16 (line 377)

Makes certain error messages in certain drivers compatible with those from other DBMS's

Portability Modes.

Bitwised constants, so they can be combined using | and removed using ^.

  • mysql, mysqli: change unique/primary key constraints DB_ERROR_ALREADY_EXISTS -> DB_ERROR_CONSTRAINT
  • odbc(access): MS's ODBC driver reports 'no such field' as code 07001, which means 'too few parameters.' When this option is on that code gets mapped to DB_ERROR_NOSUCHFIELD.

  • see: DB_common::setOption() }
DB_PORTABILITY_LOWERCASE = 1 (line 349)

Convert names of tables and fields to lower case

Portability Modes.

Bitwised constants, so they can be combined using | and removed using ^.

when using the get*(), fetch*() and tableInfo() methods

  • see: DB_common::setOption() }
DB_PORTABILITY_NONE = 0 (line 343)

Turn off all portability features

Portability Modes.

Bitwised constants, so they can be combined using | and removed using ^.

  • see: DB_common::setOption() }
DB_PORTABILITY_NULL_TO_EMPTY = 32 (line 383)

Convert null values to empty strings in data output by

Portability Modes.

Bitwised constants, so they can be combined using | and removed using ^.

get*() and fetch*()

  • see: DB_common::setOption() }
DB_PORTABILITY_NUMROWS = 8 (line 364)

Enable hack that makes numRows() work in Oracle

Portability Modes.

Bitwised constants, so they can be combined using | and removed using ^.

  • see: DB_common::setOption() }
DB_PORTABILITY_RTRIM = 2 (line 354)

Right trim the data output by get*() and fetch*()

Portability Modes.

Bitwised constants, so they can be combined using | and removed using ^.

  • see: DB_common::setOption() }
DB_TABLEINFO_FULL = 3 (line 311)

The type of information to return from the tableInfo() method.

Bitwised constants, so they can be combined using | and removed using ^.

  • see: DB_common::tableInfo() }
DB_TABLEINFO_ORDER = 1 (line 309)

The type of information to return from the tableInfo() method.

Bitwised constants, so they can be combined using | and removed using ^.

  • see: DB_common::tableInfo() }
DB_TABLEINFO_ORDERTABLE = 2 (line 310)

The type of information to return from the tableInfo() method.

Bitwised constants, so they can be combined using | and removed using ^.

  • see: DB_common::tableInfo() }

Documentation generated on Wed, 28 Mar 2007 09:54:10 -0600 by phpDocumentor 1.3.1