PHP Codeigniter - Handle multiple databases on the same server -


if write

$db1 = $this->load->database('data1',true); $db2 = $this->load->database('data2',true); 

and both databases on same server, codeigniter switch without re-connect server? if not, there way make that?
thanks!

well, codeigniter core take care of multiconnectivities. gets , remembers connection ids , call them on database interactions. allow "auto connect" feature load , instantiate database class every page load. enable "auto connecting", add word database library array, indicated in following file:

application/config/autoload.php 

for more info database connection in codeigniter visit ellislab.com


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -