Public Member Functions | |
| DiogenesDatabase ($database, $host, $user, $password) | |
| close () | |
| trace_off () | |
| trace_on () | |
| trace_format (&$page, $template='') | |
| query ($query) | |
| insert_id () | |
| err () | |
| error () | |
| errno () | |
| errinfo () | |
| ResetError () | |
| affected_rows () | |
| get_set ($table, $column) | |
| _handleError ($extras= '') | |
Public Attributes | |
| $connect_id | |
| $_trace = false | |
| $_trace_data = Array() | |
| $_fatal = false | |
| $_errno = 0 | |
| $_errstr = '' | |
| $_errinfo = '' | |
Definition at line 25 of file diogenes.database.inc.php.
| DiogenesDatabase::DiogenesDatabase | ( | $ | database, | |
| $ | host, | |||
| $ | user, | |||
| $ | password | |||
| ) |
The constructor.
| $database | The name of the database to connect to | |
| $host | The computer hosting the database server | |
| $user | The username to use to authenticate to the database server | |
| $password | The password to use in authenticating to the database server |
Definition at line 70 of file diogenes.database.inc.php.
References _handleError(), and close().
Here is the call graph for this function:

| DiogenesDatabase::close | ( | ) |
Close connection to database
Definition at line 107 of file diogenes.database.inc.php.
Referenced by DiogenesDatabase().
| DiogenesDatabase::trace_off | ( | ) |
Deactivate trace mode.
Definition at line 115 of file diogenes.database.inc.php.
| DiogenesDatabase::trace_on | ( | ) |
Activate trace mode.
Definition at line 122 of file diogenes.database.inc.php.
| DiogenesDatabase::trace_format | ( | &$ | page, | |
| $ | template = '' | |||
| ) |
Formats tracing information for output.
| $page | ||
| $template |
Definition at line 132 of file diogenes.database.inc.php.
| DiogenesDatabase::query | ( | $ | query | ) |
Execute a database query.
| $query |
Definition at line 145 of file diogenes.database.inc.php.
References _handleError(), and error().
Referenced by get_set().
Here is the call graph for this function:

| DiogenesDatabase::insert_id | ( | ) |
Return insert_id
Definition at line 175 of file diogenes.database.inc.php.
| DiogenesDatabase::err | ( | ) |
Return whether there is currently an error in effect.
Definition at line 185 of file diogenes.database.inc.php.
| DiogenesDatabase::error | ( | ) |
Return the last error string.
Definition at line 193 of file diogenes.database.inc.php.
Referenced by query().
| DiogenesDatabase::errno | ( | ) |
Return the last error number.
Definition at line 200 of file diogenes.database.inc.php.
| DiogenesDatabase::errinfo | ( | ) |
Return extra info which might help in determining the cause of the previous error.
Definition at line 208 of file diogenes.database.inc.php.
| DiogenesDatabase::ResetError | ( | ) |
Forget about any errors previously raised.
Definition at line 216 of file diogenes.database.inc.php.
| DiogenesDatabase::affected_rows | ( | ) |
Return the number rows affected by the last query.
Definition at line 226 of file diogenes.database.inc.php.
| DiogenesDatabase::get_set | ( | $ | table, | |
| $ | column | |||
| ) |
Return an array with the possibly values of a set column.
| $table | ||
| $column |
Definition at line 236 of file diogenes.database.inc.php.
References query().
Here is the call graph for this function:

| DiogenesDatabase::_handleError | ( | $ | extras = '' |
) |
Handle an error in the database.
Updates the error status information in the system, and possibly dies if we're doing that sort of thing.
| $extras |
Definition at line 252 of file diogenes.database.inc.php.
Referenced by DiogenesDatabase(), and query().
| DiogenesDatabase::$connect_id |
The id of the permanent database connection.
Definition at line 28 of file diogenes.database.inc.php.
| DiogenesDatabase::$_trace = false |
Are we in debugging mode. This variable affects whether we make detailed records of everything we do. Useful for debugging, but I imagine it probably slows down regular use a bit.
Definition at line 37 of file diogenes.database.inc.php.
| DiogenesDatabase::$_trace_data = Array() |
Historical trace data. If our queries are being logged, all of the relevant data will end up in this variable.
Definition at line 45 of file diogenes.database.inc.php.
| DiogenesDatabase::$_fatal = false |
Whether database errors are fatal.
Definition at line 49 of file diogenes.database.inc.php.
| DiogenesDatabase::$_errno = 0 |
The numeric code of the last error that occured.
Definition at line 53 of file diogenes.database.inc.php.
| DiogenesDatabase::$_errstr = '' |
The string describing the last error that occured.
Definition at line 57 of file diogenes.database.inc.php.
| DiogenesDatabase::$_errinfo = '' |
Extra info about what might have caused the error.
Definition at line 61 of file diogenes.database.inc.php.
1.5.1