adodb.inc.php

\mainpage

Classes

ADOFieldObject Helper class for FetchFields -- holds info on a column
ADODB_Cache_File
ADOConnection Connection object. For connecting to databases, and executing queries.
ADOFetchObj Internal placeholder for record objects. Used by ADORecordSet->FetchObj().
ADODB_Iterator_empty
ADORecordSet_empty Lightweight recordset when there are no records to be returned
ADODB_Iterator
ADORecordSet RecordSet class that represents the dataset returned by the database.
ADORecordSet_array This class encapsulates the concept of a recordset created in memory as an array. This is useful for the creation of cached recordsets.

Constants

_ADODB_LAYER

_ADODB_LAYER

ADODB_DIR

ADODB_DIR

ADODB_FORCE_IGNORE

ADODB_FORCE_IGNORE

ADODB_FORCE_NULL

ADODB_FORCE_NULL

ADODB_FORCE_EMPTY

ADODB_FORCE_EMPTY

ADODB_FORCE_VALUE

ADODB_FORCE_VALUE

ADODB_BAD_RS

ADODB_BAD_RS

ADODB_TABLE_REGEX

ADODB_TABLE_REGEX

ADODB_PREFETCH_ROWS

ADODB_PREFETCH_ROWS

ADODB_FETCH_DEFAULT

ADODB_FETCH_DEFAULT

Fetch mode

Set global variable $ADODB_FETCH_MODE to one of these constants or use the SetFetchMode() method to control how recordset fields are returned when fetching data.

  • NUM: array()
  • ASSOC: array('id' => 456, 'name' => 'john')
  • BOTH: array(0 => 456, 'id' => 456, 1 => 'john', 'name' => 'john')
  • DEFAULT: driver-dependent

ADODB_FETCH_NUM

ADODB_FETCH_NUM

ADODB_FETCH_ASSOC

ADODB_FETCH_ASSOC

ADODB_FETCH_BOTH

ADODB_FETCH_BOTH

ADODB_ASSOC_CASE_LOWER

ADODB_ASSOC_CASE_LOWER

Associative array case constants

By defining the ADODB_ASSOC_CASE constant to one of these values, it is possible to control the case of field names (associative array's keys) when operating in ADODB_FETCH_ASSOC fetch mode.

  • LOWER: $rs->fields['orderid']
  • UPPER: $rs->fields['ORDERID']
  • NATIVE: $rs->fields['OrderID'] (or whatever the RDBMS will return)

The default is to use native case-names.

NOTE: This functionality is not implemented everywhere, it currently works only with: mssql, odbc, oci8 and ibase derived drivers

ADODB_ASSOC_CASE_UPPER

ADODB_ASSOC_CASE_UPPER

ADODB_ASSOC_CASE_NATIVE

ADODB_ASSOC_CASE_NATIVE

TIMESTAMP_FIRST_YEAR

TIMESTAMP_FIRST_YEAR

DB_AUTOQUERY_INSERT

DB_AUTOQUERY_INSERT

AutoExecute constants (moved from adodb-pear.inc.php since they are only used in here)

DB_AUTOQUERY_UPDATE

DB_AUTOQUERY_UPDATE

ADODB_PHPVER

ADODB_PHPVER

ADODB_ASSOC_CASE

ADODB_ASSOC_CASE

Functions

ADODB_str_replace()

ADODB_str_replace(  $src,   $dest,   $data) 

Accepts $src and $dest arrays, replacing string $data

Parameters

$src
$dest
$data

ADODB_Setup()

ADODB_Setup() 

_adodb_safedate()

_adodb_safedate(  $s) 

Parameters

$s

_adodb_safedateq()

_adodb_safedateq(  $s) 

Parameters

$s

ADODB_TransMonitor()

ADODB_TransMonitor(  $dbms,   $fn,   $errno,   $errmsg,   $p1,   $p2,   $thisConnection) 

Parameters

$dbms
$fn
$errno
$errmsg
$p1
$p2
$thisConnection

ADOLoadDB()

ADOLoadDB(  $dbType) 

Synonym for ADOLoadCode. Private function. Do not use.

Parameters

$dbType

ADOLoadCode()

ADOLoadCode(  $dbType) 

Load the code for a specific database driver. Private function. Do not use.

Parameters

$dbType

NewADOConnection()

NewADOConnection(  $db = '') 

synonym for ADONewConnection for people like me who cannot remember the correct name

Parameters

$db

ADONewConnection()

ADONewConnection(  $db = '') : \the

Instantiate a new Connection class for a specific database driver.

Parameters

$db

Returns

\the —

freshly created instance of the Connection class.

_adodb_getdriver()

_adodb_getdriver(  $provider,   $drivername,   $perf = false) 

Parameters

$provider
$drivername
$perf

NewPerfMonitor()

NewPerfMonitor(  $conn) 

Parameters

$conn

NewDataDictionary()

NewDataDictionary(  $conn,   $drivername = false) 

Parameters

$conn
$drivername

adodb_pr()

adodb_pr(  $var,   $as_string = false) 

Parameters

$var
$as_string

adodb_backtrace()

adodb_backtrace(  $printOrArr = true,   $levels = 9999,   $ishtml = null) 

Parameters

$printOrArr
$levels
$ishtml