View Single Post
  #1 (permalink)  
Old 10-11-2007, 01:26 AM
identityless01 identityless01 is offline
Junior Member
 
Join Date: Oct 2007
Posts: 1
Default Using two different schemas?

In ZF, is it possible to connect to two different DB schemas?

I'm using Oracle and I have two DB schemas.
Example:
[schema1]
table1(id, column1, column2,...)
table2(id, column1, column2,...)

[schema2]
table1(id, column1, column2,...)
table2(id, column1, column2,...)

Now, I want to run a query like
SELECT *
FROM schema1.table2 t1, schema2.table1 t2
WHERE t1.id = t2.id

or something to that effect. Do I have to modify my config.ini to accommodate for two different DB users?

Like,
[db1]
db.adapter = Oracle
db.config.host = localhost
db.config.username = db1
db.config.password = pass
db.config.dbname = xe

[db2]
db.adapter = Oracle
db.config.host = localhost
db.config.username = db2
db.config.password = pass
db.config.dbname = xe

Can anyone show me how to set this up?
Reply With Quote