====== getInstance ====== {#JAPI Joomla.Framework Database JDatabase::getInstance #} Returns a reference to the global Database object, only creating it if it doesn't already exist. ===== Syntax ===== [[JDatabase|JDatabase]] &getInstance ( **$option** ) | **$option** | array | contains the parameters to be passed to the database driver. The database driver is specified by the **$option['driver']** parameter and if omitted defaults to 'mysql'. | To connect to the Joomla! database you should not call this method directly. Instead use the [[references:joomla.framework:jfactory|JFactory]] class as follows: ---- ~~DISCUSSION~~