

Public Member Functions | |
| ADODB_odbtp () | |
| ServerInfo () | |
| ErrorMsg () | |
| ErrorNo () | |
| _insertid () | |
| _affectedrows () | |
| CreateSequence ($seqname='adodbseq', $start=1) | |
| DropSequence ($seqname) | |
| GenID ($seq='adodbseq', $start=1) | |
| _connect ($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='') | |
| _pconnect ($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='') | |
| SelectDB ($dbName) | |
| & | MetaTables ($ttype='', $showSchema=false, $mask=false) |
| & | MetaColumns ($table, $upper=true) |
| & | MetaPrimaryKeys ($table, $owner='') |
| & | MetaForeignKeys ($table, $owner='', $upper=false) |
| BeginTrans () | |
| CommitTrans ($ok=true) | |
| RollbackTrans () | |
| & | SelectLimit ($sql, $nrows=-1, $offset=-1, $inputarr=false, $secs2cache=0) |
| Prepare ($sql) | |
| PrepareSP ($sql) | |
| Parameter (&$stmt, &$var, $name, $isOutput=false, $maxLen=0, $type=0) | |
| UpdateBlob ($table, $column, $val, $where, $blobtype='image') | |
| IfNull ($field, $ifNull) | |
| _query ($sql, $inputarr=false) | |
| _close () | |
Public Attributes | |
| $databaseType = "odbtp" | |
| $dataProvider = "odbtp" | |
| $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 | |
| $odbc_driver = 0 | |
| $hasAffectedRows = true | |
| supports autoincrement ID? | |
| $hasInsertID = false | |
| $hasGenID = true | |
| has ability to run MoveFirst(), scrolling backwards | |
| $hasMoveFirst = true | |
| this is a readonly database - used by phpLens | |
| $_genSeqSQL = "create table %s (seq_name char(30) not null unique , seq_value integer not null)" | |
| $_dropSeqSQL = "delete from adodb_seq where seq_name = '%s'" | |
| $_bindInputArray = false | |
| A boolean variable to state whether its a persistent connection or normal connection. */. | |
| $_useUnicodeSQL = false | |
| $_canPrepareSP = false | |
| $_dontPoolDBC = true | |
Definition at line 17 of file adodb-odbtp.inc.php.
| ADODB_odbtp.ADODB_odbtp | ( | ) |
Definition at line 36 of file adodb-odbtp.inc.php.
Referenced by ADODB_odbtp_unicode.ADODB_odbtp_unicode().
| ADODB_odbtp.ServerInfo | ( | ) |
Get server version info...
Reimplemented from ADOConnection.
Definition at line 40 of file adodb-odbtp.inc.php.
| ADODB_odbtp.ErrorMsg | ( | ) |
Reimplemented from ADOConnection.
Definition at line 46 of file adodb-odbtp.inc.php.
Referenced by _connect().
| ADODB_odbtp.ErrorNo | ( | ) |
Reimplemented from ADOConnection.
Definition at line 52 of file adodb-odbtp.inc.php.
| ADODB_odbtp._insertid | ( | ) |
Definition at line 58 of file adodb-odbtp.inc.php.
References ADOConnection.GetOne().

| ADODB_odbtp._affectedrows | ( | ) |
Definition at line 68 of file adodb-odbtp.inc.php.
| ADODB_odbtp.CreateSequence | ( | $ | seqname = 'adodbseq', |
|
| $ | start = 1 | |||
| ) |
Reimplemented from ADOConnection.
Definition at line 76 of file adodb-odbtp.inc.php.
References $ok, $path, ADOConnection.Execute(), and ADOConnection.GetOne().

| ADODB_odbtp.DropSequence | ( | $ | seqname | ) |
Reimplemented from ADOConnection.
Definition at line 100 of file adodb-odbtp.inc.php.
References ADOConnection.Execute().

| ADODB_odbtp.GenID | ( | $ | seqname = 'adodbseq', |
|
| $ | startID = 1 | |||
| ) |
Generates a sequence id and stores it in $this->genID; GenID is only available if $this->hasGenID = true;
| seqname | name of sequence to use | |
| startID | if sequence does not exist, start at this ID |
Reimplemented from ADOConnection.
Definition at line 106 of file adodb-odbtp.inc.php.
References $ok, $path, ADOConnection.Execute(), and ADOConnection.GetOne().

| ADODB_odbtp._connect | ( | $ | HostOrInterface, | |
| $ | UserOrDSN = '', |
|||
| $ | argPassword = '', |
|||
| $ | argDatabase = '' | |||
| ) |
Definition at line 150 of file adodb-odbtp.inc.php.
References _bindInputArray, ErrorMsg(), and hasTransactions.
Referenced by _pconnect().

| ADODB_odbtp._pconnect | ( | $ | HostOrInterface, | |
| $ | UserOrDSN = '', |
|||
| $ | argPassword = '', |
|||
| $ | argDatabase = '' | |||
| ) |
Definition at line 260 of file adodb-odbtp.inc.php.
References _connect().

| ADODB_odbtp.SelectDB | ( | $ | dbName | ) |
Choose a database to connect to. Many databases do not support this.
| dbName | is the name of the database to select |
Reimplemented from ADOConnection.
Definition at line 266 of file adodb-odbtp.inc.php.
References database.
| 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.
Definition at line 276 of file adodb-odbtp.inc.php.
References $ADODB_FETCH_MODE, $arr, ADOConnection.GetArray(), and ADOConnection.SetFetchMode().

| & ADODB_odbtp.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.
Definition at line 298 of file adodb-odbtp.inc.php.
References $ADODB_FETCH_MODE, ADOConnection.$false, $rs, $schema, ADOConnection._findschema(), ADOConnection.Execute(), and ADOConnection.SetFetchMode().

| & ADODB_odbtp.MetaPrimaryKeys | ( | $ | table, | |
| $ | owner = '' | |||
| ) |
Reimplemented from ADOConnection.
Definition at line 344 of file adodb-odbtp.inc.php.
References $ADODB_FETCH_MODE, $arr, and ADOConnection.GetArray().

| & ADODB_odbtp.MetaForeignKeys | ( | $ | table, | |
| $ | owner = '', |
|||
| $ | upper = false | |||
| ) |
Reimplemented from ADOConnection.
Definition at line 361 of file adodb-odbtp.inc.php.
References $ADODB_FETCH_MODE, $arr, ADOConnection.$false, $v, and ADOConnection.GetArray().

| ADODB_odbtp.BeginTrans | ( | ) |
Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().
Reimplemented from ADOConnection.
Definition at line 391 of file adodb-odbtp.inc.php.
References $rs, and hasTransactions.
| ADODB_odbtp.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 406 of file adodb-odbtp.inc.php.
References $ok, and RollbackTrans().

| ADODB_odbtp.RollbackTrans | ( | ) |
If database does not support transactions, rollbacks always fail, so return false
Reimplemented from ADOConnection.
Definition at line 417 of file adodb-odbtp.inc.php.
Referenced by CommitTrans().
| & ADODB_odbtp.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.
Definition at line 427 of file adodb-odbtp.inc.php.
References $sql, and ADOConnection.SelectLimit().

| ADODB_odbtp.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 437 of file adodb-odbtp.inc.php.
References $sql, $stmt, and _bindInputArray.
| ADODB_odbtp.PrepareSP | ( | $ | sql | ) |
| ADODB_odbtp.Parameter | ( | &$ | stmt, | |
| &$ | var, | |||
| $ | name, | |||
| $ | isOutput = false, |
|||
| $ | maxLen = 0, |
|||
| $ | type = 0 | |||
| ) |
Reimplemented from ADOConnection.
Definition at line 476 of file adodb-odbtp.inc.php.
References $stmt.
| ADODB_odbtp.UpdateBlob | ( | $ | table, | |
| $ | column, | |||
| $ | val, | |||
| $ | where, | |||
| $ | blobtype = 'image' | |||
| ) |
Update a blob column, given a where clause. There are more sophisticated blob handling functions that we could have implemented, but all require a very complex API. Instead we have chosen something that is extremely simple to understand and use.
Note: $blobtype supports 'BLOB' and 'CLOB', default is BLOB of course.
Usage to update a $blobvalue which has a primary key blob_id=1 into a field blobtable.blobcolumn:
UpdateBlob('blobtable', 'blobcolumn', $blobvalue, 'blob_id=1');
Insert example:
$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');
Reimplemented from ADOConnection.
Definition at line 502 of file adodb-odbtp.inc.php.
| ADODB_odbtp.IfNull | ( | $ | field, | |
| $ | ifNull | |||
| ) |
| ADODB_odbtp._query | ( | $ | sql, | |
| $ | inputarr = false | |||
| ) |
| ADODB_odbtp._close | ( | ) |
Definition at line 562 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$databaseType = "odbtp" |
Reimplemented from ADOConnection.
Reimplemented in ADODB_odbtp_unicode.
Definition at line 18 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$dataProvider = "odbtp" |
| ADODB_odbtp.$fmtDate = "'Y-m-d'" |
uppercase function
Reimplemented from ADOConnection.
Definition at line 20 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$fmtTimeStamp = "'Y-m-d, h:i:sA'" |
used by DBDate() as the default date format used by the database
Reimplemented from ADOConnection.
Definition at line 21 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$replaceQuote = "''" |
string that represents FALSE for a database
Reimplemented from ADOConnection.
Definition at line 22 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$odbc_driver = 0 |
Definition at line 23 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$hasAffectedRows = true |
supports autoincrement ID?
Reimplemented from ADOConnection.
Definition at line 24 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$hasInsertID = false |
| ADODB_odbtp.$hasGenID = true |
has ability to run MoveFirst(), scrolling backwards
Reimplemented from ADOConnection.
Definition at line 26 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$hasMoveFirst = true |
this is a readonly database - used by phpLens
Reimplemented from ADOConnection.
Definition at line 27 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$_genSeqSQL = "create table %s (seq_name char(30) not null unique , seq_value integer not null)" |
Definition at line 29 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$_dropSeqSQL = "delete from adodb_seq where seq_name = '%s'" |
Definition at line 30 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$_bindInputArray = false |
A boolean variable to state whether its a persistent connection or normal connection. */.
Reimplemented from ADOConnection.
Definition at line 31 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$_useUnicodeSQL = false |
| ADODB_odbtp.$_canPrepareSP = false |
Definition at line 33 of file adodb-odbtp.inc.php.
| ADODB_odbtp.$_dontPoolDBC = true |
Definition at line 34 of file adodb-odbtp.inc.php.