06-05-2010, 07:59 AM
[eluser]Unknown[/eluser]
hello,
trying to connect to a different database, one with a variable name. no matter what I do, ci keeps the old connection. following the userguide, in my model function I set up
in a method called later,
In desperation I have removed my database.php config to try all connections in this fashion, to no avail.
pconnect is false for all, I have tried
as well as
was wondering if anyone could lend a hand here, i'm nearly out of ideas.
thanks,
brandon
hello,
trying to connect to a different database, one with a variable name. no matter what I do, ci keeps the old connection. following the userguide, in my model function I set up
Code:
$config['param'] = 'param';
...
$this->load->database($config);
$this->db->query($sql)
in a method called later,
Code:
$config['newparam'] = 'param';
...
$this->load->database($config);
$this->db->query($sql)
In desperation I have removed my database.php config to try all connections in this fashion, to no avail.
pconnect is false for all, I have tried
Code:
$this->load->database($config,false);
as well as
Code:
$this->different_db = $this->load->database($config);
$this->different_db->query($sql);
was wondering if anyone could lend a hand here, i'm nearly out of ideas.
thanks,
brandon