Welcome Guest, Not a member yet? Register   Sign In
someone help me please?
#1

[eluser]phpProgrammerToBe[/eluser]
can someone please help me how to connect to multiple database?
hi i know this is an old issue i have found some questions similar to this question and also the answers as well. but for some reason i cant make it run..
i also followed the instructions at the user guide but i cant still make it....

this is what i have done.i put the database group at database.php
Code:
$active_group = 'default';
$active_record = TRUE;
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'mcd';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

$db['oceano']['hostname'] = 'localhost';
$db['oceano']['username'] = 'root';
$db['oceano']['password'] = '';
$db['oceano']['database'] = 'ocd';
$db['oceano']['dbdriver'] = 'mysql';
$db['oceano']['dbprefix'] = '';
$db['oceano']['pconnect'] = TRUE;
$db['oceano']['db_debug'] = TRUE;
$db['oceano']['cache_on'] = FALSE;
$db['oceano']['cachedir'] = '';
$db['oceano']['char_set'] = 'utf8';
$db['oceano']['dbcollat'] = 'utf8_general_ci';
$db['oceano']['swap_pre'] = '';
$db['oceano']['autoinit'] = TRUE;
$db['oceano']['stricton'] = FALSE;

after this what do i have to do?


im sorry for asking stupid questions Sad




Theme © iAndrew 2016 - Forum software by © MyBB