DB
[ class tree: DB ] [ index: DB ] [ all elements ]

File: DB.php

Source Location: /DB-1.7.14/DB.php

Classes:

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

Page Details:

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.

Includes:

require_once('PEAR.php') [line 30]
Obtain the PEAR class so it can be extended from

DB_AUTOQUERY_INSERT [line 320]

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

[ Top ]



DB_AUTOQUERY_UPDATE [line 321]

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

[ Top ]



DB_BINMODE_CONVERT [line 242]

DB_BINMODE_CONVERT = 3
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".


[ Top ]



DB_BINMODE_PASSTHRU [line 230]

DB_BINMODE_PASSTHRU = 1
Sends the fetched data straight through to output

The different ways of returning binary data from queries.


[ Top ]



DB_BINMODE_RETURN [line 235]

DB_BINMODE_RETURN = 2
Lets you return data as usual

The different ways of returning binary data from queries.


[ Top ]



DB_ERROR [line 52]

DB_ERROR = -1
Unkown error

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_ACCESS_VIOLATION [line 172]

DB_ERROR_ACCESS_VIOLATION = -26
The present user has inadequate permissions to perform the task requestd

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_ALREADY_EXISTS [line 72]

DB_ERROR_ALREADY_EXISTS = -5
Tried to create a duplicate object

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_CANNOT_CREATE [line 122]

DB_ERROR_CANNOT_CREATE = -15
Could not create the object requested

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_CANNOT_DROP [line 127]

DB_ERROR_CANNOT_DROP = -17
Could not drop the database requested because it does not exist

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_CONNECT_FAILED [line 162]

DB_ERROR_CONNECT_FAILED = -24
Could not connect to the database

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_CONSTRAINT [line 62]

DB_ERROR_CONSTRAINT = -3
Tried to insert a duplicate value into a primary or unique index

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_CONSTRAINT_NOT_NULL [line 182]

DB_ERROR_CONSTRAINT_NOT_NULL = -29
Tried to insert a null value into a column that doesn't allow nulls

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_DIVZERO [line 112]

DB_ERROR_DIVZERO = -13
Attempt to divide something by zero

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_EXTENSION_NOT_FOUND [line 167]

DB_ERROR_EXTENSION_NOT_FOUND = -25
The PHP extension needed for this DBMS could not be found

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_INVALID [line 87]

DB_ERROR_INVALID = -8
A literal submitted did not match the data type expected

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_INVALID_DATE [line 107]

DB_ERROR_INVALID_DATE = -12
A literal date submitted did not match the data type expected

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_INVALID_DSN [line 157]

DB_ERROR_INVALID_DSN = -23
The DSN submitted has problems

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_INVALID_NUMBER [line 102]

DB_ERROR_INVALID_NUMBER = -11
A literal number submitted did not match the data type expected

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_MISMATCH [line 82]

DB_ERROR_MISMATCH = -7
The number of parameters does not match the number of placeholders

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_NEED_MORE_DATA [line 142]

DB_ERROR_NEED_MORE_DATA = -20
The data submitted to the method was inappropriate

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_NODBSELECTED [line 117]

DB_ERROR_NODBSELECTED = -14
A database needs to be selected

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_NOSUCHDB [line 177]

DB_ERROR_NOSUCHDB = -27
The database requested does not exist

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_NOSUCHFIELD [line 137]

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

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_NOSUCHTABLE [line 132]

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

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_NOT_CAPABLE [line 92]

DB_ERROR_NOT_CAPABLE = -9
The current DBMS does not support the action you attempted

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_NOT_FOUND [line 67]

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

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_NOT_LOCKED [line 147]

DB_ERROR_NOT_LOCKED = -21
The attempt to lock the table failed

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_SYNTAX [line 57]

DB_ERROR_SYNTAX = -2
Syntax error

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_TRUNCATED [line 97]

DB_ERROR_TRUNCATED = -10
A literal submitted was too long so the end of it was removed

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_UNSUPPORTED [line 77]

DB_ERROR_UNSUPPORTED = -6
The current driver does not support the action you attempted

One of PEAR DB's portable error codes.


[ Top ]



DB_ERROR_VALUE_COUNT_ON_ROW [line 152]

DB_ERROR_VALUE_COUNT_ON_ROW = -22
The number of columns doesn't match the number of values

One of PEAR DB's portable error codes.


[ Top ]



DB_FETCHMODE_ASSOC [line 269]

DB_FETCHMODE_ASSOC = 2
Column data indexed by column names

Fetch Modes.


[ Top ]



DB_FETCHMODE_DEFAULT [line 259]

DB_FETCHMODE_DEFAULT = 0
Indicates the current default fetch mode should be used

Fetch Modes.


[ Top ]



DB_FETCHMODE_FLIPPED [line 283]

DB_FETCHMODE_FLIPPED = 4
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.


[ Top ]



DB_FETCHMODE_OBJECT [line 274]

DB_FETCHMODE_OBJECT = 3
Column data as object properties

Fetch Modes.


[ Top ]



DB_FETCHMODE_ORDERED [line 264]

DB_FETCHMODE_ORDERED = 1
Column data indexed by numbers, ordered from 0 and up

Fetch Modes.


[ Top ]



DB_GETMODE_ASSOC [line 290]

DB_GETMODE_ASSOC = DB_FETCHMODE_ASSOC
Old fetch modes. Left here for compatibility.

[ Top ]



DB_GETMODE_FLIPPED [line 291]

DB_GETMODE_FLIPPED = DB_FETCHMODE_FLIPPED
Old fetch modes. Left here for compatibility.

[ Top ]



DB_GETMODE_ORDERED [line 289]

DB_GETMODE_ORDERED = DB_FETCHMODE_ORDERED
Old fetch modes. Left here for compatibility.

[ Top ]



DB_OK [line 47]

DB_OK = 1
The code returned by many methods upon success

One of PEAR DB's portable error codes.


[ Top ]



DB_PARAM_MISC [line 215]

DB_PARAM_MISC = 3
Indicates a misc (!) placeholder was used

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


[ Top ]



DB_PARAM_OPAQUE [line 208]

DB_PARAM_OPAQUE = 2
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.


[ Top ]



DB_PARAM_SCALAR [line 200]

DB_PARAM_SCALAR = 1
Indicates a scalar (?) placeholder was used

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


[ Top ]



DB_PORTABILITY_ALL [line 389]

DB_PORTABILITY_ALL = 63
Turn on all portability features

Portability Modes.

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


[ Top ]



DB_PORTABILITY_DELETE_COUNT [line 360]

DB_PORTABILITY_DELETE_COUNT = 4
Force reporting the number of rows deleted

Portability Modes.

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


[ Top ]



DB_PORTABILITY_ERRORS [line 378]

DB_PORTABILITY_ERRORS = 16
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.


[ Top ]



DB_PORTABILITY_LOWERCASE [line 350]

DB_PORTABILITY_LOWERCASE = 1
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


[ Top ]



DB_PORTABILITY_NONE [line 344]

DB_PORTABILITY_NONE = 0
Turn off all portability features

Portability Modes.

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


[ Top ]



DB_PORTABILITY_NULL_TO_EMPTY [line 384]

DB_PORTABILITY_NULL_TO_EMPTY = 32
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*()


[ Top ]



DB_PORTABILITY_NUMROWS [line 365]

DB_PORTABILITY_NUMROWS = 8
Enable hack that makes numRows() work in Oracle

Portability Modes.

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


[ Top ]



DB_PORTABILITY_RTRIM [line 355]

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

Portability Modes.

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


[ Top ]



DB_TABLEINFO_FULL [line 312]

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

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


[ Top ]



DB_TABLEINFO_ORDER [line 310]

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

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


[ Top ]



DB_TABLEINFO_ORDERTABLE [line 311]

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

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


[ Top ]



Documentation generated on Sat, 27 Aug 2011 14:00:06 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.