references:joomla.framework:database:jdatabasemysqli-__constructTable of Contents
__construct
Database object constructor. SyntaxJDatabaseMySQLi __construct ( $options )
The following parameters may be used in the $option array:-
ExamplesConnecting to an external MySQL database. <?php $option['driver'] = 'mysqli'; // Database driver name $option['host'] = 'db.myhost.com'; // Database host name $option['user'] = 'fredbloggs'; // User for database authentication $option['password'] = 's9(39s£h[%dkFd'; // Password for database authentication $option['database'] = 'bigdatabase'; // Database name $option['prefix'] = 'abc_'; // Database prefix (may be empty) $db = & JDatabase::getInstance( $option ); ?> Discussion |


