Public Member Functions | |
| DB ($base, $server, $user, $pass) | |
| query ($query, $debug=-1) | |
| execute ($query, $debug=-1) | |
| fetchNextObject ($result=NULL) | |
| numRows ($result=NULL) | |
| queryUniqueObject ($query, $debug=-1) | |
| queryUniqueValue ($query, $debug=-1) | |
| maxOf ($column, $table, $where) | |
| maxOfAll ($column, $table) | |
| countOf ($table, $where) | |
| countOfAll ($table) | |
| debugAndDie ($query) | |
| debug ($debug, $query, $result=NULL) | |
| debugQuery ($query, $reason="Debug") | |
| debugResult ($result) | |
| getExecTime () | |
| getQueriesCount () | |
| resetFetch ($result) | |
| lastInsertedId () | |
| close () | |
| getMicroTime () | |
Public Attributes | |
| $defaultDebug = false | |
| $mtStart | |
| $nbQueries | |
| $lastResult | |
|
||||||||||||||||||||
|
Connect to a MySQL database to be able to use the methods below. |
|
|
Close the connexion with the database server. |
|
||||||||||||
|
Get the count of rows in a table, with a condition.
|
|
|
Get the count of rows in a table.
|
|
||||||||||||||||
|
Internal function to debug a MySQL query.
|
|
|
Internal function to debug when MySQL encountered an error, even if debug is set to Off.
|
|
||||||||||||
|
Internal function to output a query for debug purpose.
|
|
|
Internal function to output a table representing the result of a query, for debug purpose.
|
|
||||||||||||
|
Do the same as query() but do not return nor store result.
|
|
|
Convenient method for mysql_fetch_object().
|
|
|
Get how many time the script took from the begin of this object.
|
|
|
Internal method to get the current time.
|
|
|
Get the number of queries executed from the begin of this object.
|
|
|
Get the id of the very last inserted row.
|
|
||||||||||||||||
|
Get the maximum value of a column in a table, with a condition.
|
|
||||||||||||
|
Get the maximum value of a column in a table.
|
|
|
Get the number of rows of a query.
|
|
||||||||||||
|
Query the database.
|
|
||||||||||||
|
Get the result of the query as an object. The query should return a unique row.
|
|
||||||||||||
|
Get the result of the query as value. The query should return a unique cell.
|
|
|
Go back to the first element of the result line.
|
|
|
Put this variable to true if you want ALL queries to be debugged by default: |
|
|
INTERNAL: The last result ressource of a query(). |
|
|
INTERNAL: The start time, in miliseconds. |
|
|
INTERNAL: The number of executed queries. |
1.3.3