• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting up 2 databases

#3
(03-07-2016, 12:19 PM)Your config: Wrote:
PHP Code:
$active_group 'default';
$query_builder TRUE;

$db['db1_name'] = array(
    <
details of standard database in here>
);

$db['db2_name'] = array(
    <
details of 2nd database in here>
); 

In your models...

PHP Code:
$db1 $this->load->database('db1_name'true);
$db2 $this->load->database('db2_name'true); 

Access with:
PHP Code:
$q1 $db1->query(...)->... or with other methods
$q2 
$db2->query()... etc
Reply


Messages In This Thread
Setting up 2 databases - by doomie22 - 03-07-2016, 12:19 PM
RE: Setting up 2 databases - by donpwinston - 03-07-2016, 12:38 PM
RE: Setting up 2 databases - by mixinix - 03-07-2016, 02:14 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.