This is database.php
in the config
$tnsname = '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =
192.168.0.59)(PORT = 3021))
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = xe)))';
$db['default'] = array(
'dsn' => '',
'hostname' => $tnsname,
'username' => 'user',
'password' => '******',
'database' => '',
'dbdriver' => 'oci8',
'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' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
How do I change the value of the variable $ tnsname
through a controller
?
When the user authenticates in the system and chooses a code in the login, this code will indicate which value goes in that variable ( $ tnsname
)