This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » Differents domains with differents databases
Differents domains with differents databases [message #93681] Tue, 16 February 2010 16:38 Go to next message
nono  is currently offline nono
Messages: 1
Registered: February 2010
Location: France
Junior Member

I'd like to connect different databases for different domains names because I don't want to multiply source files on server and I don't want to add a domain column in primary key for each table, so I want to prefix database name with domain name before connection. The other connection properties may be the same for each domain.

I'd think to redefine sfDatabaseManager in my project lib directory, with an array of domains with database connections, but it seem to be very complex to establish this with config cache, I suppose I had to modify sfDatabaseConfigHandler too.

Have someone make something about this or a simple method to do this ?

I think that domains is not only about databases and may be taken into account more on the context side.

Re: Differents domains with differents databases [message #103447 is a reply to message #93681 ] Tue, 03 August 2010 05:23 Go to previous messageGo to next message
Jurchik  is currently offline Jurchik
Messages: 2
Registered: April 2010
Junior Member
I have the same question. How to redefine sfDatabaseManager? Anybody knows?
Re: Differents domains with differents databases [message #103475 is a reply to message #93681 ] Tue, 03 August 2010 12:47 Go to previous message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Perhaps this might give you some clues, although it's about handling domains rather than connections: dvanced-Routing

Remember Palestine
Previous Topic:Error with include_once()
Next Topic:Cache and Session state
Goto Forum:

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software