Ryzom Account Management System
1.0
|
Handles the database connections. More...
Public Member Functions | |
__construct ($db) | |
The constructor. | |
executeWithoutParams ($query) | |
execute a query that doesn't have any parameters | |
execute ($query, $params) | |
execute a query that has parameters | |
executeReturnId ($query, $params) | |
execute a query (an insertion query) that has parameters and return the id of it's insertion | |
Private Attributes | |
$PDO | |
The PDO object, instantiated by the constructor. |
Handles the database connections.
It uses PDO to connect to the different databases. It will use the argument of the constructor to setup a connection to the database with the matching entry in the $cfg global variable.
__construct | ( | $ | db | ) |
The constructor.
Instantiates the PDO object attribute by connecting to the arguments matching database(the db info is stored in the $cfg global var)
$db | String, the name of the databases entry in the $cfg global var. |
execute | ( | $ | query, |
$ | params | ||
) |
execute a query that has parameters
$query | the mysql query |
$params | the parameters that are being used by the query |
executeReturnId | ( | $ | query, |
$ | params | ||
) |
execute a query (an insertion query) that has parameters and return the id of it's insertion
$query | the mysql query |
$params | the parameters that are being used by the query |
executeWithoutParams | ( | $ | query | ) |
execute a query that doesn't have any parameters
$query | the mysql query |
$PDO [private] |
The PDO object, instantiated by the constructor.