Welcome Guest, Not a member yet? Register   Sign In
multiple database connectivity
#2

[eluser]ranjitbd[/eluser]
[quote author="ranjitbd" date="1251561993"]$DB1 = $this->load->database('holidaydb', TRUE);
//where i have to add this line (within model class constructor)


//and what i will write in the config/database.php file after the following line
$db['default']['database'] = "tmartdb";
$DB1['database'] = "holidaydb"; //is it correct or
$DB1['default']['database'] = "holidaydb";//this one is correct //$DB1 is it case sensitive

//how i will get the data from that database

$this->$DB1->query(); //is it correct?
$DB1->query(); //is it correct?[/quote]


//config/autoload.php

$autoload['core'] = array(database); //this line should be enabled for miltiple database.isn't it?


Messages In This Thread
multiple database connectivity - by El Forum - 08-29-2009, 05:06 AM
multiple database connectivity - by El Forum - 08-29-2009, 05:09 AM
multiple database connectivity - by El Forum - 08-31-2009, 06:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB