Cheetah
Functions | Variables
db.inc.php File Reference

Go to the source code of this file.

Functions

 db_list_tables ()
 
 db_res ($query, $bindings=[])
 
 db_last_id ()
 
 db_affected_rows ($oStmt=null)
 
 db_res_assoc_arr ($query, $bindings=[])
 
 db_arr ($query, $bindings=[])
 
 db_assoc_arr ($query, $bindings=[])
 
 db_value ($query, $bindings=[], $error_checking=true, $index=0)
 
 fill_array ($res)
 
 fill_assoc_array ($res)
 
 getParam ($sParamName, $bUseCache=true)
 
 getParamDesc ($sParamName)
 
 setParam ($sParamName, $sParamValue)
 

Variables

 $GLOBALS ['MySQL'] = ChWsbDb::getInstance()
 
 $GLOBALS ['site']['title'] = getParam('site_title')
 
 $GLOBALS ['site']['email'] = getParam('site_email')
 
 $GLOBALS ['site']['email_notify'] = getParam('site_email_notify')
 

Function Documentation

◆ db_affected_rows()

db_affected_rows (   $oStmt = null)
Parameters
null | PDOStatement$oStmt
Returns
int

Definition at line 56 of file db.inc.php.

◆ db_arr()

db_arr (   $query,
  $bindings = [] 
)
Parameters
string$query
array$bindings
Returns
mixed

Definition at line 76 of file db.inc.php.

◆ db_assoc_arr()

db_assoc_arr (   $query,
  $bindings = [] 
)
Parameters
string$query
array$bindings
Returns
mixed

Definition at line 86 of file db.inc.php.

◆ db_last_id()

db_last_id ( )
Returns
int

Definition at line 47 of file db.inc.php.

◆ db_list_tables()

db_list_tables ( )
Returns
array

Definition at line 29 of file db.inc.php.

◆ db_res()

db_res (   $query,
  $bindings = [] 
)
Parameters
string$query
array$bindings
Returns
PDOStatement

Definition at line 39 of file db.inc.php.

◆ db_res_assoc_arr()

db_res_assoc_arr (   $query,
  $bindings = [] 
)
Parameters
string$query
array$bindings
Returns
array

Definition at line 66 of file db.inc.php.

◆ db_value()

db_value (   $query,
  $bindings = [],
  $error_checking = true,
  $index = 0 
)
Parameters
string$query
array$bindings
bool$error_checkingOnly here cuz order of args might break old code
int$index
Returns
mixed

Definition at line 98 of file db.inc.php.

◆ fill_array()

fill_array (   $res)
Parameters
$res
Returns
mixed

Definition at line 109 of file db.inc.php.

◆ fill_assoc_array()

fill_assoc_array (   $res)
Parameters
$res
Returns
mixed

Definition at line 120 of file db.inc.php.

◆ getParam()

getParam (   $sParamName,
  $bUseCache = true 
)
Parameters
$sParamName
bool$bUseCache
Returns
mixed

Definition at line 130 of file db.inc.php.

◆ getParamDesc()

getParamDesc (   $sParamName)
Parameters
$sParamName
Returns
mixed

Definition at line 139 of file db.inc.php.

◆ setParam()

setParam (   $sParamName,
  $sParamValue 
)
Parameters
$sParamName
$sParamValue
Returns
mixed

Definition at line 149 of file db.inc.php.

Variable Documentation

◆ $GLOBALS [1/4]

$GLOBALS[ 'MySQL'] = ChWsbDb::getInstance()

Definition at line 17 of file db.inc.php.

◆ $GLOBALS [2/4]

$GLOBALS[ 'site'][ 'email'] = getParam('site_email')

Definition at line 20 of file db.inc.php.

◆ $GLOBALS [3/4]

$GLOBALS[ 'site'][ 'email_notify'] = getParam('site_email_notify')

Definition at line 21 of file db.inc.php.

◆ $GLOBALS [4/4]

$GLOBALS[ 'site'][ 'title'] = getParam('site_title')

Definition at line 19 of file db.inc.php.