multiple databases connectivity |
I have the following code in model to connect to another database.
PHP Code: $db_name = $this->session->userdata('db_name'); but if I try to query in another model using the anoterDb using the following: PHP Code: $query=$this->anotherDb->query("SELECT fieldValue error: Quote:Message: Undefined property: Users::$anotherDb to remove this error I need to reconnect to above database "anotherDb" in every model. How can I solve this? How can I make some global variable to be used in every model? |
Messages In This Thread |
multiple databases connectivity - by nadeem14375 - 10-12-2017, 07:13 PM
RE: multiple databases connectivity - by dave friend - 10-13-2017, 04:12 PM
RE: multiple databases connectivity - by nadeem14375 - 10-15-2017, 01:49 PM
|