Posts

Showing posts from April, 2019

How to load 2 databases in one single coding using Codeigniter?

Go to application/config/database.php . Create another database config like default database. //Default database configuration $db [ 'default' ] = array(      'dsn'        =>  '' ,      'hostname'  =>  'localhost' ,      'username'  =>  'db_username' ,      'password'  =>  'db_password' ,      'database'  =>  'db_name' ,      'dbdriver'  =>  'mysqli' ,      'dbprefix'  =>  '' ,      'pconnect'  =>  FALSE ,      'db_debug'  => ( ENVIRONMENT  !==  'production' ),      'cache_on'  =>  FALSE ,      'cachedir'  =>  '' ,      'char_set'  =>  'utf8' ,      'dbcollat'  =>  'utf8_general_ci' ,      'swap_pre'  =>  '' ,      'encrypt'   =>  FALSE ,      'compress'  =>  FALSE ,      'stricton'  =>  FA