Public Member Functions | |
| __construct ($user, $pwd, $server, $dbname, $pfx='', $debug=false) | |
| database ($dbname) | |
| getServerInfo () | |
| debug ($query) | |
| close () | |
| select ($query) | |
| execute ($query) | |
| getLastID () | |
| getError () | |
| esc ($str) | |
| qn ($col) | |
| begin () | |
| commit () | |
| rollback () | |
| __toString () | |
Public Attributes | |
| $con_id | |
| $pfx = '' | |
| $lastquery = '' | |
| $engine = 'MySQL' | |
| $type_cast = array() | |
Private Attributes | |
| $debug = false | |
| Pluf_DB_MySQL::__construct | ( | $ | user, | |
| $ | pwd, | |||
| $ | server, | |||
| $ | dbname, | |||
| $ | pfx = '', |
|||
| $ | debug = false | |||
| ) |
| Pluf_DB_MySQL::database | ( | $ | dbname | ) |
| Pluf_DB_MySQL::getServerInfo | ( | ) |
Get the version of the MySQL server.
| Pluf_DB_MySQL::debug | ( | $ | query | ) |
Log the queries. Keep track of the last query and if in debug mode keep track of all the queries in $GLOBALS['_PX_debug_data']['sql_queries']
| string | Query to keep track |
| Pluf_DB_MySQL::close | ( | ) |
| Pluf_DB_MySQL::select | ( | $ | query | ) |
| Pluf_DB_MySQL::execute | ( | $ | query | ) |
| Pluf_DB_MySQL::getLastID | ( | ) |
| Pluf_DB_MySQL::getError | ( | ) |
Returns a string ready to be used in the exception.
| Pluf_DB_MySQL::esc | ( | $ | str | ) |
| Pluf_DB_MySQL::qn | ( | $ | col | ) |
Quote the column name.
| string | Name of the column |
| Pluf_DB_MySQL::begin | ( | ) |
Start a transaction.
| Pluf_DB_MySQL::commit | ( | ) |
Commit a transaction.
| Pluf_DB_MySQL::rollback | ( | ) |
Rollback a transaction.
| Pluf_DB_MySQL::__toString | ( | ) |
| Pluf_DB_MySQL::$con_id |
| Pluf_DB_MySQL::$pfx = '' |
Pluf_DB_MySQL::$debug = false [private] |
| Pluf_DB_MySQL::$lastquery = '' |
The last query, set with debug(). Used when an error is returned.
| Pluf_DB_MySQL::$engine = 'MySQL' |
| Pluf_DB_MySQL::$type_cast = array() |