Welcome Guest, Not a member yet? Register   Sign In
HELP!!! Connecting to Oracle 9i
#6

[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...


Messages In This Thread
HELP!!! Connecting to Oracle 9i - by El Forum - 11-04-2009, 04:12 AM
HELP!!! Connecting to Oracle 9i - by El Forum - 11-04-2009, 04:42 AM
HELP!!! Connecting to Oracle 9i - by El Forum - 11-04-2009, 05:19 PM
HELP!!! Connecting to Oracle 9i - by El Forum - 11-04-2009, 07:35 PM
HELP!!! Connecting to Oracle 9i - by El Forum - 12-15-2009, 01:09 AM
HELP!!! Connecting to Oracle 9i - by El Forum - 12-15-2009, 01:11 AM
HELP!!! Connecting to Oracle 9i - by El Forum - 12-15-2009, 02:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB