Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]

ADOdb base PDO driver

Copyright: 2000-2013 John Lim
Copyright: 2014 Damien Regad, Mark Newnham and the ADOdb community
License: BSD-3-Clause
License: LGPL-2.1-or-later
File Size: 922 lines (21 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 classes

ADODB_pdo:: (35 methods):
  _UpdatePDO()
  Time()
  _connect()
  Concat()
  param()
  _pconnect()
  SelectLimit()
  ServerInfo()
  MetaTables()
  MetaColumns()
  metaIndexes()
  metaPrimaryKeys()
  metaForeignKeys()
  metaProcedures()
  InParameter()
  OffsetDate()
  SelectDB()
  SQLDate()
  ErrorMsg()
  ErrorNo()
  SetAutoCommit()
  SetTransactionMode()
  beginTrans()
  commitTrans()
  RollbackTrans()
  Prepare()
  PrepareStmt()
  createSequence()
  DropSequence()
  GenID()
  _query()
  _close()
  _affectedrows()
  _insertID()
  qStr()

ADODB_pdo_base:: (5 methods):
  _init()
  ServerInfo()
  SelectLimit()
  MetaTables()
  MetaColumns()

ADOPDOStatement:: (7 methods):
  __construct()
  Execute()
  InParameter()
  Affected_Rows()
  ErrorMsg()
  NumCols()
  ErrorNo()

Name:: (0 methods):

ADORecordSet_pdo:: (8 methods):
  __construct()
  Init()
  _initrs()
  FetchField()
  _seek()
  _fetch()
  _close()
  Fields()

ADORecordSet_array_pdo:: (0 methods):

Defines 0 functions


Class: ADODB_pdo  - X-Ref

_UpdatePDO()   X-Ref
No description

Time()   X-Ref
No description

_connect($argDSN, $argUsername, $argPassword, $argDatabasename, $persist=false)   X-Ref
No description

Concat()   X-Ref
No description

param($name,$type='C')   X-Ref
Triggers a driver-specific request for a bind parameter

param: string $name
param: string $type
return: string

_pconnect($argDSN, $argUsername, $argPassword, $argDatabasename)   X-Ref
No description

SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)   X-Ref
No description

ServerInfo()   X-Ref
No description

MetaTables($ttype=false,$showSchema=false,$mask=false)   X-Ref
No description

MetaColumns($table,$normalize=true)   X-Ref
No description

metaIndexes($table,$normalize=true,$owner=false)   X-Ref
No description

metaPrimaryKeys($table,$owner=false)   X-Ref
Return a list of Primary Keys for a specified table.

param: string   $table
param: bool     $owner      (optional) not used in this driver
return: string[]    Array of indexes

metaForeignKeys($table, $owner = '', $upper = false, $associative = false)   X-Ref
Returns a list of Foreign Keys associated with a specific table.

param: string   $table
param: string   $owner      (optional) not used in this driver
param: bool     $upper
param: bool     $associative
return: string[]|false An array where keys are tables, and values are foreign keys;

metaProcedures($procedureNamePattern = null, $catalog = null, $schemaPattern = null)   X-Ref
List procedures or functions in an array.

param: $procedureNamePattern A procedure name pattern; must match the procedure name as it is stored in the database.
param: $catalog              A catalog name; must match the catalog name as it is stored in the database.
param: $schemaPattern        A schema name pattern.
return: false|array false if not supported, or array of procedures on current database with structure below

InParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false)   X-Ref
No description

OffsetDate($dayFraction,$date=false)   X-Ref
No description

SelectDB($dbName)   X-Ref
No description

SQLDate($fmt, $col=false)   X-Ref
No description

ErrorMsg()   X-Ref
No description

ErrorNo()   X-Ref
No description

SetAutoCommit($auto_commit)   X-Ref

param: bool $auto_commit
return: void

SetTransactionMode($transaction_mode)   X-Ref
No description

beginTrans()   X-Ref
No description

commitTrans($ok=true)   X-Ref
No description

RollbackTrans()   X-Ref
No description

Prepare($sql)   X-Ref
No description

PrepareStmt($sql)   X-Ref
No description

createSequence($seqname='adodbseq',$startID=1)   X-Ref
No description

DropSequence($seqname='adodbseq')   X-Ref
No description

GenID($seqname='adodbseq',$startID=1)   X-Ref
No description

_query($sql,$inputarr=false)   X-Ref
No description

_close()   X-Ref
No description

_affectedrows()   X-Ref
No description

_insertID($table = '', $column = '')   X-Ref
No description

qStr($s, $magic_quotes = false)   X-Ref
Quotes a string to be sent to the database.

If we have an active connection, delegates quoting to the underlying
PDO object PDO::quote(). Otherwise, replace "'" by the value of
$replaceQuote (same behavior as mysqli driver).

param: string  $s           The string to quote
param: bool   $magic_quotes This param is not used since 5.21.0.
return: string Quoted string

Class: ADODB_pdo_base  - X-Ref

_init($parentDriver)   X-Ref
No description

ServerInfo()   X-Ref
No description

SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)   X-Ref
No description

MetaTables($ttype=false,$showSchema=false,$mask=false)   X-Ref
No description

MetaColumns($table,$normalize=true)   X-Ref
No description

Class: ADOPDOStatement  - X-Ref

__construct($stmt,$connection)   X-Ref
No description

Execute($inputArr=false)   X-Ref
No description

InParameter(&$var,$name,$maxLen=4000,$type=false)   X-Ref
No description

Affected_Rows()   X-Ref
No description

ErrorMsg()   X-Ref
No description

NumCols()   X-Ref
No description

ErrorNo()   X-Ref
No description

Class: Name  - X-Ref

Class: ADORecordSet_pdo  - X-Ref

__construct($id,$mode=false)   X-Ref
No description

Init()   X-Ref
No description

_initrs()   X-Ref
No description

FetchField($fieldOffset = -1)   X-Ref
No description

_seek($row)   X-Ref
No description

_fetch()   X-Ref
No description

_close()   X-Ref
No description

Fields($colname)   X-Ref
No description

Functions that are not part of a class:

adodb_pdo_type($t)   X-Ref
No description