Public Member Functions | |
| __construct ($user="", $pass="", $db="", $server="", $port="3306") | |
| Establish a database connection. | |
| __destruct () | |
| Called when the object is destroyed. | |
| clearErrors () | |
| Clear any errors that have been set on this object. | |
| fieldName () | |
| Get the field names from the result of the last query. | |
| getDB () | |
| Get the database object. | |
| getDBName () | |
| INSERT BRIEF DESCRIPTION HERE. | |
| getError ($pos="") | |
| Get a list of the errors set on this object, or a single error message. | |
| getQuery () | |
| Get the last query used. | |
| getResult ($index="") | |
| Get the (cached) results for a given query to the database. | |
| hasError () | |
| INSERT BRIEF DESCRIPTION HERE. | |
| mysql_insert_id () | |
| Get the last mysql_insert_id. | |
| query ($query, $queryInfo=false) | |
| Run a query on the database. | |
| setError ($errorMessage) | |
| Set (report) an error on this object. | |
| setResult ($resultIndex, $resultIn) | |
| Store (cache) the results for a given query to the database. | |
Definition at line 15 of file DBI.php5.
| DBI::__construct | ( | $ | user = "", |
|
| $ | pass = "", |
|||
| $ | db = "", |
|||
| $ | server = "", |
|||
| $ | port = "3306" | |||
| ) |
Establish a database connection.
| $user | [string]: Database username | |
| $pass | [string]: Database password | |
| $db | [string]: Database name | |
| $server | [string]: Database server name | |
| $port | [int]: Database port number |
Definition at line 36 of file DBI.php5.
References setError().
| DBI::__destruct | ( | ) |
Called when the object is destroyed.
Prints out the total DBI time used if common.debugQueries is on
Definition at line 69 of file DBI.php5.
References SConfig::getOption().
| DBI::fieldName | ( | ) |
| DBI::getDB | ( | ) |
| DBI::getDBName | ( | ) |
| DBI::getError | ( | $ | pos = "" |
) |
| DBI::getQuery | ( | ) |
| DBI::getResult | ( | $ | index = "" |
) |
Get the (cached) results for a given query to the database.
| $index | [string]: The index at which the results were cached -- normally use the query as the index. If no index is defined, return all stored results. |
Definition at line 199 of file DBI.php5.
Referenced by query().
| DBI::hasError | ( | ) |
| DBI::mysql_insert_id | ( | ) |
| DBI::query | ( | $ | query, | |
| $ | queryInfo = false | |||
| ) |
Run a query on the database.
| $query | [string]: The SQL query to be run | |
| $queryInfo | [bool]: Should the returned array have additional query info stored? (optional, false by default) |
Definition at line 89 of file DBI.php5.
References SConfig::getOption(), getResult(), SErrorManager::setWarning(), and SErrorManager::sobj_setDebug().
| DBI::setError | ( | $ | errorMessage | ) |
Set (report) an error on this object.
| $errorMessage | [string]: The error to be set |
Definition at line 142 of file DBI.php5.
Referenced by __construct().
| DBI::setResult | ( | $ | resultIndex, | |
| $ | resultIn | |||
| ) |
1.5.6