multiple databases in conf.ini

A place for users and developers of the Xataface to discuss and receive support.

multiple databases in conf.ini

Postby blange » Mon Apr 19, 2010 9:54 am

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
blange
 
Posts: 6
Joined: Tue Feb 09, 2010 12:51 pm

Re: multiple databases in conf.ini

Postby PolderBoy » Thu Apr 22, 2010 8:12 am

Hello Brian,

I am pretty sure you can't do this.

PolderBoy
PolderBoy
 
Posts: 72
Joined: Fri Apr 03, 2009 12:53 am

Re: multiple databases in conf.ini

Postby Richard » Tue Apr 24, 2012 12:07 am

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
Richard
 
Posts: 2
Joined: Fri Apr 20, 2012 8:42 am

Re: multiple databases in conf.ini

Postby shannah » Sat Apr 28, 2012 9:56 pm

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved