Your Ad Here
ClickBank1
ClickBank1

in joomla whether we can use two mysql databases for a single project?

a117.jpg”>joomla

Aarmin J bupropion online rx asked:


in my joomla project i want to insert data to two mysql database…….
is it possible in joomla?

Different Kinds Of Web 2.0 Sites

Buy a prescription online




One Response to “in joomla whether we can use two mysql databases for a single project?”

  1. You cannot split your *Joomla* data into different database. However if you want to access another database within your own component, that’s possible.

    This is how you can connect to your own database :

    # Set your database connection
    $driver = ‘mysql’;
    $host = ‘your_host_name’;
    $user = ‘yourdatabase_user’;
    $password = ’123456′;
    $database = ‘yourdatabase_name’;
    $prefix = ”;
    $options= array ( ‘driver’ => $driver, ‘host’ => $host, ‘user’ => $user, ‘password’ => $password, ‘database’ => $database, ‘prefix’ => $prefix );
    $db =& JDatabase::getInstance( $options );

    # Go ahead and work with your database
    $query = “SELECT whatever FROM yourtable”;
    $db->setQuery( $query );
    $result = $db->loadObject();

    Please, specify if it is what you wanted ?!