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

[eluser]ranjitbd[/eluser]
$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?
#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?
#3

[eluser]ranjitbd[/eluser]
i followed the manual but but its not working




Theme © iAndrew 2016 - Forum software by © MyBB