Welcome Guest, Not a member yet? Register   Sign In
codeigniter multiple database
#1

[eluser]dhiya[/eluser]
Hi, I'm using codeigniter to connect into two databases.
For the first one I get a result from my queries, but the second establishment of the connection is not accomplished, it looks a little bit weird :////

here is my database.php file:

$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = '********';
$db['default']['username'] = '********';
$db['default']['password'] = '********';
$db['default']['database'] = '********';
$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['base2']['hostname'] = '********';
$db['base2']['username'] = '********';
$db['base2']['password'] = '********';
$db['base2']['database'] = '********';
$db['base2']['dbdriver'] = 'mysql';
$db['base2']['dbprefix'] = '';
$db['base2']['pconnect'] = TRUE;
$db['base2']['db_debug'] = TRUE;
$db['base2']['cache_on'] = FALSE;
$db['base2']['cachedir'] = '';
$db['base2']['char_set'] = 'utf8';
$db['base2']['dbcollat'] = 'utf8_general_ci';
$db['base2']['swap_pre'] = '';
$db['base2']['autoinit'] = TRUE;
$db['base2']['stricton'] = FALSE;


I appreciate your help very much
#2

[eluser]CroNiX[/eluser]
See "connecting to multiple databases"
#3

[eluser]weboap[/eluser]
http://ellislab.com/forums/viewthread/145901/
#4

[eluser]dhiya[/eluser]
thanks for your answers, but still don't work Sad
I don't know what's the problem here.




Theme © iAndrew 2016 - Forum software by © MyBB