0
I have 2 projects, one is the copy of the other, one I want to leave online and the other test for me to program on top, so I copied the database and copied the project, changed the name, changed the directory, and put the 2 on the same server, but my test project insists on using the old database, no matter how much in the.php database the new database is. I’ll send you what’s in the database.php, this matches 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.php database of the test project:
$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 I was clear, my project is using a different database than the one in the.php database.
What is the database name he uses on his own?
– rray
It’s not being clear because the key names are the same... which is why you’re not getting the bank properly
– novic
They are different systems, the name of the key may be the same but they are 2 database.php different, the test system that is the copy of the first, even though in the database.php references the sasClone, it ends up using the normal sas.
– Filipe da Silva de Oliveira