

Public Member Functions | |
| ADODB_pdo () | |
| _UpdatePDO () | |
| Time () | |
| _connect ($argDSN, $argUsername, $argPassword, $argDatabasename, $persist=false) | |
| _pconnect ($argDSN, $argUsername, $argPassword, $argDatabasename) | |
| SelectLimit ($sql, $nrows=-1, $offset=-1, $inputarr=false, $secs2cache=0) | |
| ServerInfo () | |
| MetaTables ($ttype=false, $showSchema=false, $mask=false) | |
| MetaColumns ($table, $normalize=true) | |
| InParameter (&$stmt, &$var, $name, $maxLen=4000, $type=false) | |
| ErrorMsg () | |
| ErrorNo () | |
| BeginTrans () | |
| CommitTrans ($ok=true) | |
| RollbackTrans () | |
| Prepare ($sql) | |
| PrepareStmt ($sql) | |
| _query ($sql, $inputarr=false) | |
| _close () | |
| _affectedrows () | |
| _insertid () | |
Public Attributes | |
| $databaseType = "pdo" | |
| $dataProvider = "pdo" | |
| $fmtDate = "'Y-m-d'" | |
| uppercase function | |
| $fmtTimeStamp = "'Y-m-d, h:i:sA'" | |
| used by DBDate() as the default date format used by the database | |
| $replaceQuote = "''" | |
| string that represents FALSE for a database | |
| $hasAffectedRows = true | |
| supports autoincrement ID? | |
| $_bindInputArray = true | |
| A boolean variable to state whether its a persistent connection or normal connection. */. | |
| $_genSeqSQL = "create table %s (id integer)" | |
| $_autocommit = true | |
| $_haserrorfunctions = true | |
| $_lastAffectedRows = 0 | |
| $_errormsg = false | |
| $_errorno = false | |
| $dsnType = '' | |
| $stmt = false | |
Definition at line 102 of file adodb-pdo.inc.php.
| ADODB_pdo.ADODB_pdo | ( | ) |
Definition at line 121 of file adodb-pdo.inc.php.
| ADODB_pdo._UpdatePDO | ( | ) |
| ADODB_pdo.Time | ( | ) |
Reimplemented from ADOConnection.
Definition at line 140 of file adodb-pdo.inc.php.
References $rs, $sql, ADOConnection._Execute(), and ADOConnection.UnixTimeStamp().

| ADODB_pdo._connect | ( | $ | argDSN, | |
| $ | argUsername, | |||
| $ | argPassword, | |||
| $ | argDatabasename, | |||
| $ | persist = false | |||
| ) |
Definition at line 152 of file adodb-pdo.inc.php.
References $class, and _UpdatePDO().
Referenced by _pconnect().

| ADODB_pdo._pconnect | ( | $ | argDSN, | |
| $ | argUsername, | |||
| $ | argPassword, | |||
| $ | argDatabasename | |||
| ) |
Definition at line 205 of file adodb-pdo.inc.php.
References _connect().

| ADODB_pdo.SelectLimit | ( | $ | sql, | |
| $ | nrows = -1, |
|||
| $ | offset = -1, |
|||
| $ | inputarr = false, |
|||
| $ | secs2cache = 0 | |||
| ) |
Will select, getting rows from $offset (1-based), for $nrows. This simulates the MySQL "select * from table limit $offset,$nrows" , and the PostgreSQL "select * from table limit $nrows offset $offset". Note that MySQL and PostgreSQL parameter ordering is the opposite of the other. eg. SelectLimit('select * from table',3); will return rows 1 to 3 (1-based) SelectLimit('select * from table',3,2); will return rows 3 to 5 (1-based)
Uses SELECT TOP for Microsoft databases (when $this->hasTop is set) BUG: Currently SelectLimit fails with $sql with LIMIT or TOP clause already set
| sql | ||
| [offset] | is the row to start calculations from (1-based) | |
| [nrows] | is the number of rows to get | |
| [inputarr] | array of bind variables | |
| [secs2cache] | is a private parameter only used by jlim |
Reimplemented from ADOConnection.
Reimplemented in ADODB_pdo_base, ADODB_pdo_mssql, ADODB_pdo_mysql, and ADODB_pdo_pgsql.
Definition at line 213 of file adodb-pdo.inc.php.
| ADODB_pdo.ServerInfo | ( | ) |
Get server version info...
Reimplemented from ADOConnection.
Reimplemented in ADODB_pdo_base, ADODB_pdo_mssql, ADODB_pdo_mysql, and ADODB_pdo_pgsql.
Definition at line 224 of file adodb-pdo.inc.php.
| ttype | can either be 'VIEW' or 'TABLE' or false. If false, both views and tables are returned. "VIEW" returns only views "TABLE" returns only tables | |
| showSchema | returns the schema/user with the table name, eg. USER.TABLE | |
| mask | is the input mask - only supported by oci8 and postgresql |
Reimplemented from ADOConnection.
Reimplemented in ADODB_pdo_mysql, ADODB_pdo_oci, and ADODB_pdo_pgsql.
Definition at line 229 of file adodb-pdo.inc.php.
| ADODB_pdo.MetaColumns | ( | $ | table, | |
| $ | normalize = true | |||
| ) |
List columns in a database as an array of ADOFieldObjects. See top of file for definition of object.
| $table | table name to query | |
| $normalize | makes table name case-insensitive (required by some databases) is optional database schema to use - not supported by all databases. |
Reimplemented from ADOConnection.
Reimplemented in ADODB_pdo_pgsql.
Definition at line 234 of file adodb-pdo.inc.php.
| ADODB_pdo.InParameter | ( | &$ | stmt, | |
| &$ | var, | |||
| $ | name, | |||
| $ | maxLen = 4000, |
|||
| $ | type = false | |||
| ) |
Reimplemented from ADOConnection.
Definition at line 239 of file adodb-pdo.inc.php.
References $stmt.
| ADODB_pdo.ErrorMsg | ( | ) |
Reimplemented from ADOConnection.
Definition at line 247 of file adodb-pdo.inc.php.
References $arr.
| ADODB_pdo.ErrorNo | ( | ) |
Reimplemented from ADOConnection.
Definition at line 263 of file adodb-pdo.inc.php.
References $arr.
| ADODB_pdo.BeginTrans | ( | ) |
Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().
Reimplemented from ADOConnection.
Definition at line 278 of file adodb-pdo.inc.php.
References hasTransactions.
| ADODB_pdo.CommitTrans | ( | $ | ok = true |
) |
If database does not support transactions, always return true as data always commited
| $ok | set to false to rollback transaction, true to commit |
Reimplemented from ADOConnection.
Definition at line 288 of file adodb-pdo.inc.php.
References $ok, hasTransactions, and RollbackTrans().

| ADODB_pdo.RollbackTrans | ( | ) |
If database does not support transactions, rollbacks always fail, so return false
Reimplemented from ADOConnection.
Definition at line 301 of file adodb-pdo.inc.php.
References hasTransactions.
Referenced by CommitTrans().
| ADODB_pdo.Prepare | ( | $ | sql | ) |
Should prepare the sql statement and return the stmt resource. For databases that do not support this, we return the $sql. To ensure compatibility with databases that do not support prepare:
$stmt = $db->Prepare("insert into table (id, name) values (?,?)"); $db->Execute($stmt,array(1,'Jill')) or die('insert failed'); $db->Execute($stmt,array(2,'Joe')) or die('insert failed');
| sql | SQL to send to database |
Reimplemented from ADOConnection.
Definition at line 313 of file adodb-pdo.inc.php.
References $sql.
| ADODB_pdo.PrepareStmt | ( | $ | sql | ) |
| ADODB_pdo._query | ( | $ | sql, | |
| $ | inputarr = false | |||
| ) |
| ADODB_pdo._close | ( | ) |
Definition at line 371 of file adodb-pdo.inc.php.
| ADODB_pdo._affectedrows | ( | ) |
Definition at line 377 of file adodb-pdo.inc.php.
| ADODB_pdo._insertid | ( | ) |
Definition at line 382 of file adodb-pdo.inc.php.
| ADODB_pdo.$databaseType = "pdo" |
| ADODB_pdo.$dataProvider = "pdo" |
| ADODB_pdo.$fmtDate = "'Y-m-d'" |
uppercase function
Reimplemented from ADOConnection.
Reimplemented in ADODB_pdo_pgsql.
Definition at line 105 of file adodb-pdo.inc.php.
| ADODB_pdo.$fmtTimeStamp = "'Y-m-d, h:i:sA'" |
used by DBDate() as the default date format used by the database
Reimplemented from ADOConnection.
Reimplemented in ADODB_pdo_pgsql.
Definition at line 106 of file adodb-pdo.inc.php.
| ADODB_pdo.$replaceQuote = "''" |
string that represents FALSE for a database
Reimplemented from ADOConnection.
Definition at line 107 of file adodb-pdo.inc.php.
| ADODB_pdo.$hasAffectedRows = true |
supports autoincrement ID?
Reimplemented from ADOConnection.
Reimplemented in ADODB_pdo_pgsql.
Definition at line 108 of file adodb-pdo.inc.php.
| ADODB_pdo.$_bindInputArray = true |
A boolean variable to state whether its a persistent connection or normal connection. */.
Reimplemented from ADOConnection.
Definition at line 109 of file adodb-pdo.inc.php.
| ADODB_pdo.$_genSeqSQL = "create table %s (id integer)" |
| ADODB_pdo.$_autocommit = true |
Definition at line 111 of file adodb-pdo.inc.php.
| ADODB_pdo.$_haserrorfunctions = true |
Definition at line 112 of file adodb-pdo.inc.php.
| ADODB_pdo.$_lastAffectedRows = 0 |
Definition at line 113 of file adodb-pdo.inc.php.
| ADODB_pdo.$_errormsg = false |
Definition at line 115 of file adodb-pdo.inc.php.
| ADODB_pdo.$_errorno = false |
Definition at line 116 of file adodb-pdo.inc.php.
| ADODB_pdo.$dsnType = '' |
Definition at line 118 of file adodb-pdo.inc.php.
| ADODB_pdo.$stmt = false |
Definition at line 119 of file adodb-pdo.inc.php.
Referenced by _query(), InParameter(), and PrepareStmt().