If you need to access tables within the same database as your Joomla! installation then you can simply use the JFactory->getDbo method. This uses the already established connection that Joomla! uses to connect to the database. <?php $db = JFactory::getDbo(); ?> But what if you want to connect to a completely different database from the one used by Joomla!?. This might be...