CWIS Developer Documentation
|
Public Member Functions | |
SPTDatabase () | |
![]() | |
Database ($UserName=NULL, $Password=NULL, $DatabaseName=NULL, $HostName=NULL) | |
Object constructor. | |
__sleep () | |
| |
__wakeup () | |
Restore database connection when unserialized. | |
DBHostName () | |
Get host name of system on which database server resides. | |
DBName () | |
Get current database name. | |
DBUserName () | |
Get name used to connect with database server. | |
SetQueryErrorsToIgnore ($ErrorsToIgnore) | |
Set query errors to ignore. | |
Query ($QueryString, $FieldName="") | |
Query database (with caching if enabled). | |
QueryErrMsg () | |
Get most recent error message text set by Query(). | |
QueryErrNo () | |
Get most recent error code set by Query(). | |
NumRowsSelected () | |
Get number of rows returned by last query. | |
FetchRow () | |
Get next database row retrieved by most recent query. | |
FetchRows ($NumberOfRows=NULL) | |
Get specified number of database rows retrieved by most recent query. | |
FetchColumn ($FieldName, $IndexFieldName=NULL) | |
Get all available values for specified database field retrieved by most recent query. | |
FetchField ($FieldName) | |
Pull next row from last DB query and get a specific value from that row. | |
LastInsertId ($TableName) | |
Get ID of row added by the last SQL "INSERT" statement. | |
UpdateValue ($TableName, $FieldName, $NewValue, $Condition, &$CachedRecord) | |
A convenience function to get or set a value in the database. | |
UpdateIntValue ($TableName, $FieldName, $NewValue, $Condition, &$CachedRecord) | |
A convenience function to get or set an integer value in the database. | |
UpdateFloatValue ($TableName, $FieldName, $NewValue, $Condition, &$CachedRecord) | |
A convenience function to get or set a float value in the database. | |
LogComment ($String) | |
Peform query that consists of SQL comment statement. | |
FieldExists ($TableName, $FieldName) | |
Get whether specified field exists in specified table. | |
Additional Inherited Members | |
![]() | |
static | SetGlobalServerInfo ($UserName, $Password, $HostName="localhost") |
| |
static | SetGlobalDatabaseName ($DatabaseName) |
Set default database name. | |
static | Caching ($NewSetting=NULL) |
Get or set whether query result caching is currently enabled. | |
static | AdvancedCaching ($NewSetting=NULL) |
Get or set whether advanced query result cachine is currently enabled. | |
static | DisplayQueryErrors ($NewValue=NULL) |
Get/set whether Query() errors will be displayed. | |
static | QueryDebugOutput ($NewSetting) |
Enable or disable debugging output for queries. | |
static | NumQueries () |
Get the number of queries that have been run since program execution began. | |
static | NumCacheHits () |
Get the number of queries that have resulted in cache hits since program execution began. | |
static | CacheHitRate () |
Get the ratio of query cache hits to queries as a percentage. | |
![]() | |
$DBUserName | |
$DBPassword | |
$DBHostName | |
$DBName | |
Definition at line 17 of file SPTDatabase.php.
SPTDatabase::SPTDatabase | ( | ) |
Definition at line 22 of file SPTDatabase.php.
References Database\Database().