Welcome Guest, Not a member yet? Register   Sign In
dbforge database trouble
#1

[eluser]Unknown[/eluser]
Hello all !

I ve got a first sgbd object defined in the config/database.
When the user make his ident a new sgbd object is created in my_model :
Code:
if($this->session->userdata('logged_in')) {
            $dsn = 'mysql://'.$this->session->userdata('sql_login').':'.$this->session->userdata('sql_pass').'@localhost/'.$this->session->userdata('sql_db').'?char_set=utf8&dbcollat=utf8_general_ci&cache_on=true&cachedir;=';
            $this->db = $this->load->database($dsn, TRUE);
  }
this is OK

in an other model, i use a method to create a new mysql table with dbforge.
In this method, if i print_r($this->db) i have the correct sgbd object but when i use dbforge to create the table, this one is created in the first database (this who's define in the config/database)


Thx for help !!




Theme © iAndrew 2016 - Forum software by © MyBB