Page 1 of 1

multiple databases in conf.ini

PostPosted: Mon Apr 19, 2010 9:54 am
by blange
Can I include multiple database in the conf.ini file. If so, how do I do this and how to a reference the tables for each database.

Thanks,

-Brian

Re: multiple databases in conf.ini

PostPosted: Thu Apr 22, 2010 8:12 am
by PolderBoy
Hello Brian,

I am pretty sure you can't do this.

PolderBoy

Re: multiple databases in conf.ini

PostPosted: Tue Apr 24, 2012 12:07 am
by Richard
Hi,

i have the same problem.

If will make a relationsship between tables in different databases.

in conf.ini it is not possible to let the databasename clear.

In relationship the databasename will be added in the query (why, if the databasename will be forced in conf.ini)
so relationship between different databases is not possible, which is'nt not...


is there a possibility which i have overseen...?

richard

Re: multiple databases in conf.ini

PostPosted: Sat Apr 28, 2012 9:56 pm
by shannah
Multiple databases are currently not supported. A workaround is to make MySQL views for any tables that you need to reference in another database. Then just use those views in your application.

E.g.

Database d1 has table t1
Database d2 has table t2

Suppose your application is set up for database d1 but you need to access table d2.t2. Then create a view in d1 called t2 defined as follows:
Code: Select all
create view t2 as select * from d2.t2


That effectively allows you to access table t2 from your application.

Remember to define the primary key for your view though
http://xataface.com/documentation/how-to/views

-Steve