Combu Server
3.1.1
PHP API Documentation
|
Public Member Functions | |
__construct ($dbType, $dbServer, $dbPort, $dbName, $dbUser, $dbPass) | |
GetConnection () | |
CloseConnection () | |
TestConnection () | |
Query ($query) | |
InsertedId ($name=NULL) | |
AffectedRows () | |
FetchAssoc ($result) | |
FetchNum ($result) | |
Escape ($text) | |
EscapeDate ($text) | |
RecordExists ($query) | |
TransactionStart () | |
TransactionCommit () | |
TransactionRollback () | |
GetError () | |
GetErrorNo () | |
Protected Member Functions | |
_setConnection () | |
_selectDatabase () | |
Protected Attributes | |
$_dbType | |
$_dbServer | |
$_dbPort | |
$_dbName | |
$_dbUser | |
$_dbPass | |
$_connection | |
Class to handle database connection and query using mysqli
Definition at line 10 of file Database.php.
__construct | ( | $dbType, | |
$dbServer, | |||
$dbPort, | |||
$dbName, | |||
$dbUser, | |||
$dbPass | |||
) |
Class constructor
Definition at line 31 of file Database.php.
|
protected |
Selects the database specified for this instance
Definition at line 64 of file Database.php.
|
protected |
Open the connection to the database
Definition at line 52 of file Database.php.
AffectedRows | ( | ) |
Returns the records count affected by last query
Definition at line 117 of file Database.php.
CloseConnection | ( | ) |
Closes the connection to the database
Definition at line 72 of file Database.php.
Escape | ( | $text | ) |
Escape a string to be used in a query
string | $text | The string value to escape |
Definition at line 163 of file Database.php.
EscapeDate | ( | $text | ) |
Escape a date/datetime to be used in a query
string | $text | The date/datetime string value to escape |
Definition at line 172 of file Database.php.
FetchAssoc | ( | $result | ) |
Fetch next record from a resource as associative array
MySQL_Result | $result | Resource |
Definition at line 143 of file Database.php.
FetchNum | ( | $result | ) |
Fetch next record from a resource as associative array
MySQL_Result | $result | Resource |
Definition at line 154 of file Database.php.
GetConnection | ( | ) |
Returns the connection resource
Definition at line 45 of file Database.php.
GetError | ( | ) |
Returns the description of the last error occurred
Definition at line 235 of file Database.php.
GetErrorNo | ( | ) |
Returns the code of the last error occurred
Definition at line 243 of file Database.php.
InsertedId | ( | $name = NULL | ) |
Returns the autoincrement field value of the last INSERT query
Definition at line 106 of file Database.php.
Query | ( | $query | ) |
Executes a query on the database
string | $query | SQL query string to execute |
Definition at line 95 of file Database.php.
RecordExists | ( | $query | ) |
Check if a record exists from a specified query
string | $query | SELECT query to execute |
Definition at line 187 of file Database.php.
TestConnection | ( | ) |
Tests the database connection
Definition at line 83 of file Database.php.
TransactionCommit | ( | ) |
Commits a transaction
Definition at line 213 of file Database.php.
TransactionRollback | ( | ) |
Rollbacks a transaction
Definition at line 224 of file Database.php.
TransactionStart | ( | ) |
Starts a transaction
Definition at line 202 of file Database.php.
|
protected |
Definition at line 26 of file Database.php.
|
protected |
Definition at line 18 of file Database.php.
|
protected |
Definition at line 20 of file Database.php.
|
protected |
Definition at line 17 of file Database.php.
|
protected |
Definition at line 16 of file Database.php.
|
protected |
Instance connection settings
Definition at line 15 of file Database.php.
|
protected |
Definition at line 19 of file Database.php.