[eluser]Serebrennikov N. Nick[/eluser]
[quote author="mhel_dc" date="1257406522"]
I don't want to change the current profile for my default connection since my web application basically connects to MySQL it happens that some of the data is stored in oracle, so I've created another database connection profile ... by default the web application is running under MySQL... I just want to connect to oracle when needed... or if possible simultaneous connection between MySQL and Oracle.[/quote]
From CI docs :
----------------------
Connecting to Multiple Databases
If you need to connect to more than one database simultaneously you can do so as follows:
$DB1 = $this->load->database('group_one', TRUE);
$DB2 = $this->load->database('group_two', TRUE);
Note: Change the words "group_one" and "group_two" to the specific group names you are connecting to (or you can pass the connection values as indicated above).
By setting the second parameter to TRUE (boolean) the function will return the database object.
When you connect this way, you will use your object name to issue commands rather than the syntax used throughout this guide. In other words, rather than issuing commands with:
$this->db->query();
$this->db->result();
etc...
You will instead use:
$DB1->query();
$DB1->result();
etc...