I have 2 projects, one is the copy of the other, one I want to leave online and the other one to test the program, so I copied the database and copied the project, changed the name, changed the directory, and 2 on the same server, but my test project insists on using the old database, even though database.php is the new database. I will send what is in database.php, this corresponds to the database of the original file:
$db['sas'] = array(
'dsn' => '',
'hostname' => 'MyServerIp',
'username' => 'sas',
'password' => '******',
'database' => 'sas',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => FALSE);
And this is in the test project database.php:
$db['sas'] = array(
'dsn' => '',
'hostname' => 'MyServerIp',
'username' => 'sastest',
'password' => '************',
'database' => 'sasClone',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => FALSE);
In the applications I call the bank as follows:
$dbsas = $this->load->database("sas", TRUE);
I hope to have been clear, my project is using a different database than the database.php.