The Red Project
|
Public Member Functions | |
__construct ($server, $user, $pass, $db, $install=false) | |
getdb () | |
q ($sql) | |
dbg ($dbg) | |
escape ($str) | |
__destruct () | |
Public Attributes | |
$mysqli = true | |
$connected = false | |
$error = false | |
Private Attributes | |
$debug = 0 | |
$db | |
MySQL database class
For debugging, insert 'dbg(1);' anywhere in the program flow. dbg(0); will turn it off. Logging is performed at LOGGER_DATA level. When logging, all binary info is converted to text and html entities are escaped so that the debugging stream is safe to view within both terminals and web pages.
dba::__construct | ( | $server, | |
$user, | |||
$pass, | |||
$db, | |||
$install = false |
|||
) |
dba::__destruct | ( | ) |
dba::dbg | ( | $dbg | ) |
dba::escape | ( | $str | ) |
dba::getdb | ( | ) |
dba::q | ( | $sql | ) |
If dbfail.out exists, we will write any failed calls directly to it, regardless of any logging that may or may nor be in effect. These usually indicate SQL syntax errors that need to be resolved.
dba::$connected = false |
|
private |
Referenced by __construct(), and getdb().
|
private |
dba::$error = false |
Referenced by q().
dba::$mysqli = true |