Welcome Guest, Not a member yet? Register   Sign In
Multiple Database Connections
#16

[eluser]darjap[/eluser]
both of them are stored within modules/sth/models/file.php ...it works fine if i store the conection code in config/database.php, but i need a dynamic login into mysql. The function is accessed the regular way:

Code:
$this->load->model('mdl_sessions');
if($this->mdl_sessions->connect_company())
{
   //do stuff...
}


Again, if i use it within the same module(in the "do stuff" section), everything works as it should, but if i redirect to another module and try to do something else with that database, it just gives the error of database not being chosen.


Messages In This Thread
Multiple Database Connections - by El Forum - 08-23-2010, 03:44 AM
Multiple Database Connections - by El Forum - 08-23-2010, 03:52 AM
Multiple Database Connections - by El Forum - 08-23-2010, 03:58 AM
Multiple Database Connections - by El Forum - 08-23-2010, 04:17 AM
Multiple Database Connections - by El Forum - 09-09-2010, 06:50 PM
Multiple Database Connections - by El Forum - 01-19-2011, 05:27 PM
Multiple Database Connections - by El Forum - 01-19-2011, 06:49 PM
Multiple Database Connections - by El Forum - 01-19-2011, 07:35 PM
Multiple Database Connections - by El Forum - 01-19-2011, 07:51 PM
Multiple Database Connections - by El Forum - 05-01-2012, 04:07 AM
Multiple Database Connections - by El Forum - 05-01-2012, 04:26 AM
Multiple Database Connections - by El Forum - 11-30-2012, 07:58 PM
Multiple Database Connections - by El Forum - 05-12-2013, 03:20 AM
Multiple Database Connections - by El Forum - 08-09-2013, 10:58 AM
Multiple Database Connections - by El Forum - 08-09-2013, 11:23 PM
Multiple Database Connections - by El Forum - 08-10-2013, 12:10 AM
Multiple Database Connections - by El Forum - 08-21-2013, 05:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB