
Public Member Functions | |
| Affected_Rows () | |
| BitDbAdodb () | |
| CompleteTrans () | |
| CreateSequence ($seqname='adodbseq', $startID=1) | |
| createTables ($pTables, $pOptions=array()) | |
| debug ($pLevel=99) | |
| dropTables ($pTables) | |
| GenID ($pSequenceName, $pUseDbPrefix=true) | |
| getAll ($pQuery, $pValues=FALSE, $pCacheTime=BIT_QUERY_DEFAULT) | |
| getArray ($pQuery, $pValues=FALSE, $pForceArray=FALSE, $pFirst2Cols=FALSE, $pCacheTime=BIT_QUERY_DEFAULT) | |
| getAssoc ($pQuery, $pValues=FALSE, $pForceArray=FALSE, $pFirst2Cols=FALSE, $pCacheTime=BIT_QUERY_DEFAULT) | |
| getCol ($pQuery, $pValues=FALSE, $pTrim=FALSE, $pCacheTime=BIT_QUERY_DEFAULT) | |
| getDebugLevel () | |
| getOne ($pQuery, $pValues=NULL, $pNumRows=NULL, $pOffset=NULL, $pCacheTime=BIT_QUERY_DEFAULT) | |
| getRow ($pQuery, $pValues=FALSE, $pCacheTime=BIT_QUERY_DEFAULT) | |
| ifNull ($pField, $pNullRepl) | |
| ls ($pDate) | |
| MetaColumns ($table, $normalize=true, $schema=false) | |
| MetaIndexes ($table, $primary=false, $owner=false) | |
| MetaTables ($ttype=false, $showSchema=false, $mask=false) | |
| OffsetDate ($pDays, $pColumn=NULL) | |
| qstr ($pStr) | |
| query ($query, $values=null, $numrows=BIT_QUERY_DEFAULT, $offset=BIT_QUERY_DEFAULT, $pCacheTime=BIT_QUERY_DEFAULT) | |
| queryError ($pQuery, &$pError, $pValues=NULL, $pNumRows=-1, $pOffset=-1) | |
| RollbackTrans () | |
| SQLDate ($pDateFormat, $pBaseDate=false) | |
| StartTrans () | |
| tableExists ($pTable) | |
Private Member Functions | |
| convertQuery (&$pQuery) | |
Definition at line 47 of file BitDbAdodb.php.
| BitDbAdodb::Affected_Rows | ( | ) |
Reimplemented from BitDb.
Definition at line 618 of file BitDbAdodb.php.
References mDb.
| BitDbAdodb::BitDbAdodb | ( | ) |
Definition at line 49 of file BitDbAdodb.php.
References $gBitDbHost, $gBitDbName, $gBitDbPassword, $gBitDbType, $gBitDbUser, debug(), die, getDebugLevel(), mDb, mType, BitDb::postDBConnection(), and BitDb::preDBConnection().
Here is the call graph for this function:

| BitDbAdodb::CompleteTrans | ( | ) |
Used together with StartTrans() to end a transaction. Monitors connection for sql errors, and will commit or rollback as appropriate.
autoComplete if true, monitor sql errors and commit and rollback as appropriate, and if set to false force rollback even if no SQL error detected.
Reimplemented from BitDb.
Definition at line 584 of file BitDbAdodb.php.
References mDb.
| BitDbAdodb::convertQuery | ( | &$ | pQuery | ) | [private] |
Converts backtick (`) quotes to the appropriate quote for the database.
| pQuery | the SQL query using backticks (`) |
Reimplemented from BitDb.
Definition at line 524 of file BitDbAdodb.php.
Referenced by getAll(), getArray(), getAssoc(), getCol(), getRow(), query(), and queryError().
| BitDbAdodb::CreateSequence | ( | $ | seqname = 'adodbseq', |
|
| $ | startID = 1 | |||
| ) |
A database portable Sequence management function.
| pSequenceName | Name of the sequence to be used It will be created if it does not already exist | |
| pStartID | Allows setting the initial value of the sequence |
Reimplemented from BitDb.
Definition at line 460 of file BitDbAdodb.php.
| BitDbAdodb::createTables | ( | $ | pTables, | |
| $ | pOptions = array() | |||
| ) |
Used to create tables - most commonly from package/schema_inc.php files
| pTables | an array of tables and creation information in DataDict style | |
| pOptions | an array of options used while creating the tables |
Reimplemented from BitDb.
Definition at line 101 of file BitDbAdodb.php.
References $completeTableName, $dict, $result, $sql, mDb, and mType.
| BitDbAdodb::debug | ( | $ | pLevel = 99 |
) |
will activate ADODB's native debugging output
| pLevel | debugging level - FALSE is off, TRUE is on, 99 is verbose |
Reimplemented from BitDb.
Definition at line 549 of file BitDbAdodb.php.
References mDb.
Referenced by BitDbAdodb().
| BitDbAdodb::dropTables | ( | $ | pTables | ) |
Used to drop tables
| pTables | an array of table names to drop |
Reimplemented from BitDb.
Definition at line 152 of file BitDbAdodb.php.
References $completeTableName, $dict, $sql, and mDb.
| BitDbAdodb::GenID | ( | $ | pSequenceName, | |
| $ | pUseDbPrefix = true | |||
| ) |
A database portable Sequence management function.
| pSequenceName | Name of the sequence to be used It will be created if it does not already exist |
Reimplemented from BitDb.
Definition at line 438 of file BitDbAdodb.php.
| BitDbAdodb::getAll | ( | $ | pQuery, | |
| $ | pValues = FALSE, |
|||
| $ | pCacheTime = BIT_QUERY_DEFAULT | |||
| ) |
Definition at line 291 of file BitDbAdodb.php.
References $result, convertQuery(), FALSE, BitDb::isCachingActive(), mDb, BitDb::queryComplete(), and BitDb::queryStart().
Here is the call graph for this function:

| BitDbAdodb::getArray | ( | $ | pQuery, | |
| $ | pValues = FALSE, |
|||
| $ | pForceArray = FALSE, |
|||
| $ | pFirst2Cols = FALSE, |
|||
| $ | pCacheTime = BIT_QUERY_DEFAULT | |||
| ) |
Returns an associative array for the given query. See AdoDB GetAssoc() function for more detail.
| pQuery | the SQL query. Use backticks (`) to quote all table and attribute names for AdoDB to quote appropriately. | |
| pValues | an array of values used in a parameterised query | |
| pForceArray | if set to true, when an array is created for each value | |
| pFirst2Cols | if set to true, only returns the first two columns |
Reimplemented from BitDb.
Definition at line 345 of file BitDbAdodb.php.
References $result, convertQuery(), FALSE, BitDb::isCachingActive(), mDb, BitDb::queryComplete(), and BitDb::queryStart().
Here is the call graph for this function:

| BitDbAdodb::getAssoc | ( | $ | pQuery, | |
| $ | pValues = FALSE, |
|||
| $ | pForceArray = FALSE, |
|||
| $ | pFirst2Cols = FALSE, |
|||
| $ | pCacheTime = BIT_QUERY_DEFAULT | |||
| ) |
Returns an associative array for the given query. See AdoDB GetAssoc() function for more detail.
| pQuery | the SQL query. Use backticks (`) to quote all table and attribute names for AdoDB to quote appropriately. | |
| pValues | an array of values used in a parameterised query | |
| pForceArray | if set to true, when an array is created for each value | |
| pFirst2Cols | if set to true, only returns the first two columns |
Reimplemented from BitDb.
Definition at line 370 of file BitDbAdodb.php.
References $result, convertQuery(), FALSE, BitDb::isCachingActive(), mDb, BitDb::queryComplete(), and BitDb::queryStart().
Here is the call graph for this function:

| BitDbAdodb::getCol | ( | $ | pQuery, | |
| $ | pValues = FALSE, |
|||
| $ | pTrim = FALSE, |
|||
| $ | pCacheTime = BIT_QUERY_DEFAULT | |||
| ) |
Executes the SQL and returns all elements of the first column as a 1-dimensional array. The recordset is discarded for you automatically. If an error occurs, false is returned. See AdoDB GetCol() function for more detail.
| pQuery | the SQL query. Use backticks (`) to quote all table and attribute names for AdoDB to quote appropriately. | |
| pValues | an array of values used in a parameterised query | |
| pForceArray | if set to true, when an array is created for each value | |
| pFirst2Cols | if set to true, only returns the first two columns |
Definition at line 320 of file BitDbAdodb.php.
References $result, convertQuery(), FALSE, BitDb::isCachingActive(), mDb, BitDb::queryComplete(), and BitDb::queryStart().
Here is the call graph for this function:

| BitDbAdodb::getDebugLevel | ( | ) |
returns the level of query debugging output
Reimplemented from BitDb.
Definition at line 558 of file BitDbAdodb.php.
Referenced by BitDbAdodb().
| BitDbAdodb::getOne | ( | $ | pQuery, | |
| $ | pValues = NULL, |
|||
| $ | pNumRows = NULL, |
|||
| $ | pOffset = NULL, |
|||
| $ | pCacheTime = BIT_QUERY_DEFAULT | |||
| ) |
Returns a single column value from the database.
| pQuery | the SQL query. Use backticks (`) to quote all table and attribute names for AdoDB to quote appropriately. | |
| pValues | an array of values used in a parameterised query | |
| pReportErrors | report errors to STDOUT | |
| pOffset | the row number to begin returning rows from. |
Reimplemented from BitDb.
Definition at line 417 of file BitDbAdodb.php.
References $res, $result, and query().
Here is the call graph for this function:

| BitDbAdodb::getRow | ( | $ | pQuery, | |
| $ | pValues = FALSE, |
|||
| $ | pCacheTime = BIT_QUERY_DEFAULT | |||
| ) |
Executes the SQL and returns the first row as an array. The recordset and remaining rows are discarded for you automatically. If an error occurs, false is returned. See AdoDB GetRow() function for more detail.
| pQuery | the SQL query. Use backticks (`) to quote all table and attribute names for AdoDB to quote appropriately. | |
| pValues | an array of values used in a parameterised query |
Reimplemented from BitDb.
Definition at line 393 of file BitDbAdodb.php.
References $result, convertQuery(), FALSE, BitDb::isCachingActive(), mDb, BitDb::queryComplete(), and BitDb::queryStart().
Here is the call graph for this function:

| BitDbAdodb::ifNull | ( | $ | pField, | |
| $ | pNullRepl | |||
| ) |
A database portable IFNULL function.
| pField | argument to compare to NULL | |
| pNullRepl | the NULL replacement value |
Reimplemented from BitDb.
Definition at line 475 of file BitDbAdodb.php.
References mDb.
| BitDbAdodb::ls | ( | $ | pDate | ) |
Format the timestamp in the format the database accepts.
| pDate | a Unix integer timestamp or an ISO format Y-m-d H:i:s |
Reimplemented from BitDb.
Definition at line 486 of file BitDbAdodb.php.
References mDb.
| BitDbAdodb::MetaColumns | ( | $ | table, | |
| $ | normalize = true, |
|||
| $ | schema = false | |||
| ) |
List columns in a database as an array of ADOFieldObjects. See top of file for definition of object.
| table | table name to query | |
| upper | uppercase table name (required by some databases) | |
| schema | is optional database schema to use - not supported by all databases. |
Reimplemented from BitDb.
Definition at line 273 of file BitDbAdodb.php.
| BitDbAdodb::MetaIndexes | ( | $ | table, | |
| $ | primary = false, |
|||
| $ | owner = false | |||
| ) |
List indexes in a database as an array of ADOFieldObjects. See top of file for definition of object.
| table | table name to query | |
| primary | list primary indexes | |
| owner | list owner of index |
Reimplemented from BitDb.
Definition at line 287 of file BitDbAdodb.php.
References mDb.
| BitDbAdodb::MetaTables | ( | $ | ttype = false, |
|
| $ | showSchema = false, |
|||
| $ | mask = false | |||
| ) |
Create a list of tables available in the current 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 BitDb.
Definition at line 611 of file BitDbAdodb.php.
References mDb.
| BitDbAdodb::OffsetDate | ( | $ | pDays, | |
| $ | pColumn = NULL | |||
| ) |
Calculate the offset of a date for a particular database and generate appropriate SQL. Useful for calculating future/past dates and storing in a database.
| pDays | Number of days to offset by If dayFraction=1.5 means 1.5 days from now, 1.0/24 for 1 hour. | |
| pColumn | Value to be offset If NULL an offset from the current time is supplied |
Reimplemented from BitDb.
Definition at line 513 of file BitDbAdodb.php.
References mDb.
| BitDbAdodb::qstr | ( | $ | pStr | ) |
| BitDbAdodb::query | ( | $ | query, | |
| $ | values = null, |
|||
| $ | numrows = BIT_QUERY_DEFAULT, |
|||
| $ | offset = BIT_QUERY_DEFAULT, |
|||
| $ | pCacheTime = BIT_QUERY_DEFAULT | |||
| ) |
Queries the database reporting an error if detected than exiting while printing the error. -rlpowell
| pQuery | the SQL query. Use backticks (`) to quote all table and attribute names for AdoDB to quote appropriately. | |
| pValues | an array of values used in a parameterised query | |
| pNumRows | the number of rows (LIMIT) to return in this query | |
| pOffset | the row number to begin returning rows from. Used in conjunction with $pNumRows |
Reimplemented from BitDb.
Definition at line 228 of file BitDbAdodb.php.
References $offset, $query, $result, convertQuery(), FALSE, BitDb::isCachingActive(), mDb, BitDb::queryComplete(), and BitDb::queryStart().
Referenced by getOne().
Here is the call graph for this function:

| BitDbAdodb::queryError | ( | $ | pQuery, | |
| &$ | pError, | |||
| $ | pValues = NULL, |
|||
| $ | pNumRows = -1, |
|||
| $ | pOffset = -1 | |||
| ) |
Queries the database, returning an error if one occurs, rather than exiting while printing the error. -rlpowell
| pQuery | the SQL query. Use backticks (`) to quote all table and attribute names for AdoDB to quote appropriately. | |
| pError | the error string to modify and return | |
| pValues | an array of values used in a parameterised query | |
| pNumRows | the number of rows (LIMIT) to return in this query | |
| pOffset | the row number to begin returning rows from. Used in |
Reimplemented from BitDb.
Definition at line 199 of file BitDbAdodb.php.
References $result, convertQuery(), and mDb.
Here is the call graph for this function:

| BitDbAdodb::RollbackTrans | ( | ) |
If database does not support transactions, rollbacks always fail, so return false otherwise returns true if the Rollback was successful
Reimplemented from BitDb.
Definition at line 594 of file BitDbAdodb.php.
| BitDbAdodb::SQLDate | ( | $ | pDateFormat, | |
| $ | pBaseDate = false | |||
| ) |
Format date column in sql string given an input format that understands Y M D
Reimplemented from BitDb.
Definition at line 496 of file BitDbAdodb.php.
References mDb.
| BitDbAdodb::StartTrans | ( | ) |
Improved method of initiating a transaction. Used together with CompleteTrans(). Advantages include:
a. StartTrans/CompleteTrans is nestable, unlike BeginTrans/CommitTrans/RollbackTrans. Only the outermost block is treated as a transaction.
b. CompleteTrans auto-detects SQL errors, and will rollback on errors, commit otherwise.
c. All BeginTrans/CommitTrans/RollbackTrans inside a StartTrans/CompleteTrans block are disabled, making it backward compatible.
Reimplemented from BitDb.
Definition at line 572 of file BitDbAdodb.php.
References mDb.
| BitDbAdodb::tableExists | ( | $ | pTable | ) |
1.5.2