BitDb Class Reference

Inheritance diagram for BitDb:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Affected_Rows ()
 associateInsert ($insertTable, $insertData)
 associateUpdate ($updateTable, $updateData, $updateId)
 BitDb ()
 CompleteTrans ()
 convert_binary ()
 convert_sortmode ($pSortMode)
 convert_sortmode_one_item ($pSortMode)
 convertBinary ()
 convertSortmode ($pSortMode)
 convertSortmodeOneItem ($pSortMode)
 CreateSequence ($seqname='adodbseq', $startID=1)
 createTables ($pTables, $pOptions=array())
 db_byte_decode (&$pData)
 db_byte_encode (&$pData)
 dbByteDecode (&$pData)
 dbByteEncode (&$pData)
 debug ($pLevel=99)
 depText ($pFrom, $pTo)
 dropTables ($pTables)
 Execute ($pQuery, $pNumRows=false, $zf_cache=false, $pCacheTime=BIT_QUERY_DEFAULT)
 GenID ($pSequenceName, $pUseDbPrefix=true)
 getArray ($pQuery, $pValues=FALSE, $pForceArray=FALSE, $pFirst2Cols=FALSE, $pCacheTime=BIT_QUERY_DEFAULT)
 getAssoc ($pQuery, $pValues=FALSE, $pForceArray=FALSE, $pFirst2Cols=FALSE, $pCacheTime=BIT_QUERY_DEFAULT)
 getCaselessColumn ($pColumn)
 getCaseSensitivity ($pSensitivity=TRUE)
 getCol ($pQuery, $pValues=FALSE, $pTrim=FALSE)
 getDatabaseVersion ()
 getDebugLevel ()
 getOne ($pQuery, $pValues=NULL, $pNumRows=NULL, $pOffset=NULL, $pCacheTime=BIT_QUERY_DEFAULT)
 getRow ($pQuery, $pValues=FALSE, $pCacheTime=BIT_QUERY_DEFAULT)
 ifNull ($pField, $pNullRepl)
 isAdvancedPostgresEnabled ()
 isCachingActive ()
 isFatalActive ()
 isValid ()
 ls ($pDate)
 MetaColumns ($table, $normalize=true, $schema=false)
 MetaIndexes ($table, $primary=false, $owner=false)
 MetaTables ($ttype=false, $showSchema=false, $mask=false)
 NOW ()
 OffsetDate ($pDays, $pColumn=NULL)
 qstr ($pStr)
 qtNOW ()
 query ($query, $values=null, $numrows=BIT_QUERY_DEFAULT, $offset=BIT_QUERY_DEFAULT, $pCacheTime=BIT_QUERY_DEFAULT)
 queryComplete ()
 queryError ($pQuery, &$pError, $pValues=NULL, $pNumRows=-1, $pOffset=-1)
 queryStart ()
 RollbackTrans ()
 setCaching ($pCacheFlag=TRUE)
 setCaseSensitivity ($pSensitivity=TRUE)
 setFatalActive ($pActive=TRUE)
 sql_cast ($pVar, $pType)
 sqlCast ($pVar, $pType)
 SQLDate ($pDateFormat, $pBaseDate=false)
 SQLForUpdate ()
 SQLIntToTimestamp ($pColumn)
 StartTrans ()
 tableExists ($pTable)

Private Member Functions

 convertQuery (&$pQuery)
 postDBConnection ()
 preDBConnection ()

Private Attributes

 $mCacheFlag
 $mCaseSensitive = TRUE
 $mDb
 $mDebug
 $mFailed = array()
 $mFatalActive
 $mName
 $mNumQueries = 0
 $mQueryTime = 0
 $mType

Detailed Description

Definition at line 38 of file BitDbBase.php.


Member Function Documentation

BitDb::Affected_Rows (  ) 

Returns:
# rows affected by UPDATE/DELETE

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 945 of file BitDbBase.php.

BitDb::associateInsert ( insertTable,
insertData 
)

This function will take a set of fields identified by an associative array - $insertData generate a suitable SQL script and insert the data into the specified table - $insertTable

Parameters:
insertTable Name of the table to be inserted into
insertData Array of data to be inserted. Array keys provide the field names
Returns:
Error status of the insert

Definition at line 460 of file BitDbBase.php.

References $i, $query, $result, and query().

Here is the call graph for this function:

BitDb::associateUpdate ( updateTable,
updateData,
updateId 
)

This function will take a set of fields identified by an associative array - $updateData generate a suitable SQL script update the data into the specified table at the location identified in updateId which holds a name and value entry

Parameters:
updateTable Name of the table to be updated
updateData Array of data to be changed. Array keys provide the field names If an array key contains an '=' it will assumed to already be properly quoted. This allows use of keys like this: `column_name` = `column_name` + ?
updateId Array identifying the record to update. Array key 'name' provide the field name, and 'value' the record key
Returns:
Error status of the insert

Definition at line 493 of file BitDbBase.php.

References $query, $result, and query().

Here is the call graph for this function:

BitDb::BitDb (  ) 

During initialisation, database parameters are passed to the class. If these parameters are not valid, class will not be initialised.

Definition at line 95 of file BitDbBase.php.

References $gBitDbCaseSensitivity, $gDebug, FALSE, setCaseSensitivity(), and setFatalActive().

Here is the call graph for this function:

BitDb::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.

Returns:
true on commit, false on rollback.

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 928 of file BitDbBase.php.

BitDb::convert_binary (  ) 

Definition at line 1015 of file BitDbBase.php.

References convertBinary(), and depText().

Here is the call graph for this function:

BitDb::convert_sortmode ( pSortMode  ) 

Renamed a few functions - these are the temporary backward compatability calls with the deprecated note These funcitons will be removed in due course

Definition at line 1005 of file BitDbBase.php.

References convertSortmode(), and depText().

Here is the call graph for this function:

BitDb::convert_sortmode_one_item ( pSortMode  ) 

Definition at line 1010 of file BitDbBase.php.

References convertSortmode(), convertSortmodeOneItem(), and depText().

Here is the call graph for this function:

BitDb::convertBinary (  ) 

Returns the keyword to force a column comparison to be case sensitive for none case-sensitive databases (eg MySQL)

Returns:
the SQL keyword
Todo:
only used in gBitSystem and users_lib to compare login names

Definition at line 825 of file BitDbBase.php.

References mType.

Referenced by convert_binary().

BitDb::convertQuery ( &$  pQuery  )  [private]

Converts backtick (`) quotes to the appropriate quote for the database.

Parameters:
pQuery the SQL query using backticks (`)
Returns:
the correctly quoted SQL statement
Todo:
investigate replacement by AdoDB NameQuote() function

Reimplemented in BitDbAdodb.

Definition at line 680 of file BitDbBase.php.

References getCaseSensitivity(), and mType.

Referenced by BitDbPear::getAll(), BitDbPear::getArray(), BitDbPear::getAssoc(), BitDbPear::getCol(), BitDbPear::getRow(), BitDbPear::query(), and BitDbPear::queryError().

Here is the call graph for this function:

BitDb::convertSortmode ( pSortMode  ) 

Converts field sorting abbreviation to SQL - you can pass in a single string or an entire array of sortmodes

Parameters:
string or array $pSortMode fieldname and sort order string (eg name_asc) public
Returns:
the correctly quoted SQL ORDER statement

Definition at line 715 of file BitDbBase.php.

References $sql, and convertSortmodeOneItem().

Referenced by convert_sortmode(), and convert_sortmode_one_item().

Here is the call graph for this function:

BitDb::convertSortmodeOneItem ( pSortMode  ) 

Converts field sorting abbreviation to SQL and it also allows us to do things like sort by random rows.

Parameters:
array $pSortMode If pSortMode is 'random' it will insert the properly named db-specific function to achieve this. public
Returns:
valid, database-specific sortmode - if sortmode is not valid, NULL is returned

Definition at line 737 of file BitDbBase.php.

References FALSE, mType, and title.

Referenced by convert_sortmode_one_item(), and convertSortmode().

BitDb::CreateSequence ( seqname = 'adodbseq',
startID = 1 
)

A database portable Sequence management function.

Parameters:
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
Returns:
0 if not supported, otherwise a sequence id
Todo:
To be combined with GenID

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 537 of file BitDbBase.php.

BitDb::createTables ( pTables,
pOptions = array() 
)

Used to create tables - most commonly from package/schema_inc.php files

Todo:
remove references to BIT_DB_PREFIX, us a member function
Parameters:
pTables an array of tables and creation information in DataDict style
pOptions an array of options used while creating the tables
Returns:
true|false true if created with no errors | false if errors are stored in $this->mFailed

Reimplemented in BitDbAdodb.

Definition at line 249 of file BitDbBase.php.

BitDb::db_byte_decode ( &$  pData  ) 

Definition at line 1030 of file BitDbBase.php.

References dbByteDecode(), and depText().

Here is the call graph for this function:

BitDb::db_byte_encode ( &$  pData  ) 

Definition at line 1025 of file BitDbBase.php.

References dbByteEncode(), and depText().

Here is the call graph for this function:

BitDb::dbByteDecode ( &$  pData  ) 

Used to decode blob data (eg PostgreSQL)

Todo:
had a lot of trouble with AdoDB BlobEncode and BlobDecode the code works but will need work for dbs other than PgSQL
Parameters:
pData escaped blob data
Returns:
a string of raw blob data

Definition at line 894 of file BitDbBase.php.

References $ret, and mDb.

Referenced by db_byte_decode().

BitDb::dbByteEncode ( &$  pData  ) 

Used to encode blob data (eg PostgreSQL). Can be called statically

Todo:
had a lot of trouble with AdoDB BlobEncode and BlobDecode the code works but will need work for dbs other than PgSQL
Parameters:
pData a string of raw blob data
Returns:
escaped blob data

Definition at line 871 of file BitDbBase.php.

References $gBitDbType, and $ret.

Referenced by db_byte_encode().

BitDb::debug ( pLevel = 99  ) 

will activate ADODB like native debugging output

Parameters:
pLevel debugging level - FALSE is off, TRUE is on, 99 is verbose

Reimplemented in BitDbAdodb.

Definition at line 186 of file BitDbBase.php.

Referenced by BitDbPear::BitDbPear().

BitDb::depText ( pFrom,
pTo 
)

Definition at line 1035 of file BitDbBase.php.

Referenced by convert_binary(), convert_sortmode(), convert_sortmode_one_item(), db_byte_decode(), db_byte_encode(), and sql_cast().

BitDb::dropTables ( pTables  ) 

Used to drop tables

Todo:
remove references to BIT_DB_PREFIX, us a member function
Parameters:
pTables an array of table names to drop
Returns:
true | false true if dropped with no errors | false if errors are stored in $this->mFailed

Reimplemented in BitDbAdodb.

Definition at line 271 of file BitDbBase.php.

BitDb::Execute ( pQuery,
pNumRows = false,
zf_cache = false,
pCacheTime = BIT_QUERY_DEFAULT 
)

ADODB compatibility functions for bitcommerce

Reimplemented in BitDbPear.

Definition at line 335 of file BitDbBase.php.

References mType, and query().

Here is the call graph for this function:

BitDb::GenID ( pSequenceName,
pUseDbPrefix = true 
)

A database portable Sequence management function.

Parameters:
pSequenceName Name of the sequence to be used It will be created if it does not already exist
Returns:
0 if not supported, otherwise a sequence id

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 524 of file BitDbBase.php.

BitDb::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.

Parameters:
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
Returns:
the associative array, or false if an error occurs

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 412 of file BitDbBase.php.

BitDb::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.

Parameters:
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
Returns:
the associative array, or false if an error occurs

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 425 of file BitDbBase.php.

BitDb::getCaselessColumn ( pColumn  ) 

Compatibility function for DBs with case insensitive searches (like MySQL, see: http://dev.mysql.com/doc/refman/5.1/en/case-sensitivity.html) How to use: AND ".$this->mDb->getCaseLessColumn('lc.title')." = 'page title' The reason all this matters is that huge performane difference between: where title = 'PAGE TITLE' and where UPPER(tittle) = 'PAGE TITTLE' The latter version will not make use of the index on page title (at least for MySQl) while the first vesion will use the index. In a case insensitive search DB (MySQL) both forms of the query will give the same results, the only difference being the preformance. Spiderr suggested this solution and suppled the code below

Definition at line 987 of file BitDbBase.php.

References $gBitDbType, and $ret.

BitDb::getCaseSensitivity ( pSensitivity = TRUE  ) 

Sets the case sensitivity mode which is used in convertQuery

Returns:
true if DB connection is valid, false if not

Definition at line 207 of file BitDbBase.php.

References $ret, FALSE, and mType.

Referenced by convertQuery().

BitDb::getCol ( pQuery,
pValues = FALSE,
pTrim = FALSE 
)

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.

Parameters:
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
Returns:
the associative array, or false if an error occurs
Todo:
not currently used anywhere

Reimplemented in BitDbPear.

Definition at line 400 of file BitDbBase.php.

BitDb::getDatabaseVersion (  ) 

determine current version of the databse

Returns:
# hash including 'description', 'version' full string, 'major', 'minor', and 'revsion'

Definition at line 963 of file BitDbBase.php.

References $ret, and mDb.

Referenced by postDBConnection().

BitDb::getDebugLevel (  ) 

returns the level of query debugging output

Returns:
pLevel debugging level - FALSE is off, TRUE is on, 99 is verbose

Reimplemented in BitDbAdodb.

Definition at line 193 of file BitDbBase.php.

Referenced by queryComplete().

BitDb::getOne ( pQuery,
pValues = NULL,
pNumRows = NULL,
pOffset = NULL,
pCacheTime = BIT_QUERY_DEFAULT 
)

Returns a single column value from the database.

Parameters:
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.
Returns:
the associative array, or false if an error occurs

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 448 of file BitDbBase.php.

BitDb::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.

Parameters:
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
Returns:
returns the first row as an array, or false if an error occurs

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 436 of file BitDbBase.php.

BitDb::ifNull ( pField,
pNullRepl 
)

A database portable IFNULL function.

Parameters:
pField argument to compare to NULL
pNullRepl the NULL replacement value
Returns:
a string that represents the function that checks whether $pField is NULL for the given database, and if NULL, change the value returned to $pNullRepl.

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 550 of file BitDbBase.php.

BitDb::isAdvancedPostgresEnabled (  ) 

Check for Postgres specific extensions

Definition at line 952 of file BitDbBase.php.

BitDb::isCachingActive (  ) 

Function to set ADODB query caching member variable

Parameters:
pCacheExecute flag to enable or disable ADODB query caching
Returns:
nothing

Definition at line 289 of file BitDbBase.php.

Referenced by BitDbAdodb::getAll(), BitDbAdodb::getArray(), BitDbAdodb::getAssoc(), BitDbAdodb::getCol(), BitDbAdodb::getRow(), and BitDbAdodb::query().

BitDb::isFatalActive (  ) 

Determines if the database connection is valid

Returns:
true if DB connection is valid, false if not

Definition at line 166 of file BitDbBase.php.

BitDb::isValid (  ) 

Determines if the database connection is valid

Returns:
true if DB connection is valid, false if not

Definition at line 159 of file BitDbBase.php.

References mDb.

BitDb::ls ( pDate  ) 

Format the timestamp in the format the database accepts.

Parameters:
pDate a Unix integer timestamp or an ISO format Y-m-d H:i:s
Returns:
the timestamp as a quoted string.
Todo:
could be used to later convert all int timestamps into db timestamps. Currently not used anywhere.

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 560 of file BitDbBase.php.

BitDb::MetaColumns ( table,
normalize = true,
schema = false 
)

List columns in a database as an array of ADOFieldObjects. See top of file for definition of object.

Parameters:
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.
Returns:
array of ADOFieldObjects for current table.

Reimplemented in BitDbAdodb.

Definition at line 370 of file BitDbBase.php.

BitDb::MetaIndexes ( table,
primary = false,
owner = false 
)

List indexes in a database as an array of ADOFieldObjects. See top of file for definition of object.

Parameters:
table table name to query
primary list primary indexes
owner list owner of index
Returns:
array of ADOFieldObjects for current table.

Reimplemented in BitDbAdodb.

Definition at line 384 of file BitDbBase.php.

BitDb::MetaTables ( ttype = false,
showSchema = false,
mask = false 
)

Create a list of tables available in the current database

Parameters:
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
Returns:
array of tables for current database.

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 356 of file BitDbBase.php.

BitDb::NOW (  ) 

Return the current timestamp literal relevent to the database type

Todo:
This needs extending to allow the use of GMT timestamp rather then the current server time

Definition at line 569 of file BitDbBase.php.

References $gBitDbType, $gBitSystem, and $ret.

BitDb::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.

Parameters:
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
Returns:
New number of days
Todo:
Not currently used - this is database specific and uses TIMESTAMP rather than unix seconds

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 669 of file BitDbBase.php.

BitDb::postDBConnection (  )  [private]

This function contains any post-connection work

Todo:
investigate if this is the correct way to do it.

remove the BIT_DB_PREFIX, change to a member variable

get spiderr to explain the schema line

Definition at line 131 of file BitDbBase.php.

References $schema, $version, getDatabaseVersion(), mDb, and mType.

Referenced by BitDbAdodb::BitDbAdodb().

Here is the call graph for this function:

BitDb::preDBConnection (  )  [private]

This function contains any pre-connection work

Todo:
investigate if this is the correct way to do it.

Definition at line 110 of file BitDbBase.php.

References die, and mType.

Referenced by BitDbAdodb::BitDbAdodb().

BitDb::qstr ( pStr  ) 

Quotes a string to be sent to the database

Parameters:
pStr string to be quotes
Returns:
quoted string using AdoDB->qstr()

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 298 of file BitDbBase.php.

BitDb::qtNOW (  ) 

Return the current timestamp literal relevent to the database type

Todo:
This needs extending to allow the use of GMT timestamp rather then the current server time

Definition at line 586 of file BitDbBase.php.

References $gBitDbType, $gBitSystem, and $ret.

BitDb::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

Parameters:
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
Returns:
an AdoDB RecordSet object

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 328 of file BitDbBase.php.

Referenced by associateInsert(), associateUpdate(), and Execute().

BitDb::queryComplete (  ) 

Used to stop query tracking and output results if in debug mode

Reimplemented in BitDbPear.

Definition at line 224 of file BitDbBase.php.

References $gBitTimer, $gNumQueries, $style, and getDebugLevel().

Referenced by BitDbAdodb::getAll(), BitDbAdodb::getArray(), BitDbAdodb::getAssoc(), BitDbAdodb::getCol(), BitDbAdodb::getRow(), and BitDbAdodb::query().

Here is the call graph for this function:

BitDb::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

Parameters:
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
Returns:
an AdoDB RecordSet object conjunction with $pNumRows
Todo:
currently not used anywhere.

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 314 of file BitDbBase.php.

BitDb::queryStart (  ) 

Used to start query timer if in debug mode

Definition at line 179 of file BitDbBase.php.

References $gBitTimer.

Referenced by BitDbPear::getAll(), BitDbAdodb::getAll(), BitDbPear::getArray(), BitDbAdodb::getArray(), BitDbPear::getAssoc(), BitDbAdodb::getAssoc(), BitDbPear::getCol(), BitDbAdodb::getCol(), BitDbPear::getRow(), BitDbAdodb::getRow(), BitDbPear::query(), and BitDbAdodb::query().

BitDb::RollbackTrans (  ) 

If database does not support transactions, rollbacks always fail, so return false otherwise returns true if the Rollback was successful

Returns:
true/false.

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 938 of file BitDbBase.php.

BitDb::setCaching ( pCacheFlag = TRUE  ) 

Function to set ADODB query caching member variable

Parameters:
pCacheExecute flag to enable or disable ADODB query caching
Returns:
nothing

Definition at line 280 of file BitDbBase.php.

BitDb::setCaseSensitivity ( pSensitivity = TRUE  ) 

Sets the case sensitivity mode which is used in convertQuery

Returns:
true if DB connection is valid, false if not

Definition at line 200 of file BitDbBase.php.

Referenced by BitDb().

BitDb::setFatalActive ( pActive = TRUE  ) 

Determines if the database connection is valid

Returns:
true if DB connection is valid, false if not

Definition at line 173 of file BitDbBase.php.

Referenced by BitDb().

BitDb::sql_cast ( pVar,
pType 
)

Definition at line 1020 of file BitDbBase.php.

References depText(), and sqlCast().

Here is the call graph for this function:

BitDb::sqlCast ( pVar,
pType 
)

Used to cast variable types for certain databases (ie SyBase & MSSQL)

Parameters:
pVar the variable value to cast
pType the current variable type
Returns:
the SQL casting statement

Definition at line 843 of file BitDbBase.php.

References mType.

Referenced by sql_cast().

BitDb::SQLDate ( pDateFormat,
pBaseDate = false 
)

Format date column in sql string given an input format that understands Y M D

Reimplemented in BitDbAdodb, and BitDbPear.

Definition at line 652 of file BitDbBase.php.

BitDb::SQLForUpdate (  ) 

Return the sql to lock selected rows for updating. ADODB has no native support for this, see http://phplens.com/lens/lensforum/msgs.php?id=136