Grant,
I would be interested in finding out how you accomplish this (not to
hijack the topic)? Any code examples? I don't doubt you are right - I
just haven't found a solution that would let me manage the application
between 2 databases.

For instance, in a recent application (that already had data) they had
a database 'users' that housed all user information, profile, emails,
addresses, etc. Then there was another database just for news, events,
reviews, etc. Inside of the second database were the relationships to
the users in the first database. So I would need to manage a User
(from the user database) who has many Reviews (from the content
database). I don't need to switch between databases - I want to manage
two simultaneously. I know you can set $useDbConfig, but I have tried
using that and it doesn't seem to recognize the relationships between
two databases.

I hope I am incorrect - as I would love to find a solution for this.

On Mar 15, 6:58 pm, "Grant Cox" <[EMAIL PROTECTED]> wrote:
> Just to clarify, what nateklaiber says is incorrect - you can
> definitely have multiple databases used in the same application, all
> used in the same action.  The only issue I have found with it is that
> you need to provide a different MySQL username / password for the
> second connection in your app/config/database.php.  Apparently this is
> a bug with MySQL, or the PHP connector.
>
> On Mar 16, 6:47 am, "nateklaiber" <[EMAIL PROTECTED]> wrote:
>
> > If you are looking to actually use both databases, I don't think this
> > is possible with cake. The options others are giving you are to switch
> > between development/production/etc databases. Are you looking to use 2
> > together throughout the application, or just switch between two?
>
> > I had an issue where I had 2 databases - and tables in each were
> > linked to each other. This wouldn't work for Cake (at least to my
> > knowledge).
>
> > Hope that helps...
>
> > On Mar 15, 1:48 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I was wondering if it would be possible to use two databases in cake.
> > > Some models would access tables in one database and other models would
> > > access tables in another database.
>
> > > Thanks
>
> > > Guy


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to