[ Index ] |
|
Code source de LifeType 1.2.4 |
[Code source] [Imprimer] [Statistiques]
\defgroup Database <p>This module includes all database-related objects.</p>
Poids: | 175 lignes (6 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 25 fois |
Nécessite: | 0 fichiers |
Db() X-Ref |
Constructor of the class |
getDb() X-Ref |
Singleto method that should be used to get access to the global database connection. This method will load the database information from the database configuration file (config/config.properties.php) and will initialize a connection based on its information. If it is unable to start a new database connection, this method wil stop all processing and display an error message. return: Returns a reference to a PDb driver, with a working connection to the database. |
getNewDb( $host, $username, $password, $dbname ) X-Ref |
Creates a new database instance based on the information provided param: host The database host where to connect param: username The username used for the connection param: password The password used for the connection param: dbname The name of the database param: returns a reference to a PDb driver or dies if there was an error connecting |
getPrefix() X-Ref |
returns the prefix as configured for this database connection return: A string containing the database prefix |
qstr($string) X-Ref |
Prepares a string for an SQL query by escaping apostrophe characters. If the PHP configuration setting 'magic_quotes_gpc' is set to ON, it will first strip the added slashes. Apostrophe characters are doubled, conforming with the ANSI SQL standard. The SQL parser makes sure that the escape token is not entered in the database so there is no need to modify the data when it is read from the database. param: string $string return: string |
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |