Selecting Dynamic Database on user input |
Hi
I am working on a system that lets users decide which database they want to use upon login. I want the user selected database to be used throughout the system. I store the user selected database value in session to later access it anywhere. I have tried following solutions: In model constructor: $selectedDb = $this->session->get_userdata('database'); $new_db_obj = $this->load->database($selectedDb); $this->db = $new_db; reason for doing $this->db = $new_db; I use $this->db->query() in all system and can't make changes everywhere if I do not do this. Please help me here if you can shagleazar. Thanks |
Welcome Guest, Not a member yet? Register Sign In |