Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-23 Thread [EMAIL PROTECTED]
Thanks for clarifying your application's context, Rick. I am more used the the kind of application where you decide to build a web-app and then create the database schema you need. When dealing with corporate databases I have previously either synchronized a subset of that data to a "web database"

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-23 Thread Rick
Thanks for your response Martin. Maybe that was too harsh. Perhaps it was just that the developers never thought of an application spanning multiple databases. For a medium to large company it is common practice to seperate related data into different databases within the same db instance. (MyS

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-23 Thread [EMAIL PROTECTED]
To call it an arbitrary limitation is a bit harsh. Having Cake support queries and associations across multiple databases would be a cool feature but I struggle to find a very good reason for willingly design an application in this way. CakePHP was never designes to be compatible with any and all

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-23 Thread Rick
As I said before I do NOT want to use raw queries. Seems like Cake is applying arbitrary limitations. Do any of the developers read these posts? Be nice to have an opinion from one or more cake developers. Rick On Sep 23, 3:00 am, Bookrock <[EMAIL PROTECTED]> wrote: > Thanks for your suggest

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-23 Thread Bookrock
Thanks for your suggestions. Raw queries for multiplae datbase is working fine $this->query("select * from caketoodoo.tasks as t2, test.stores as t1 where t2.id = t1.id"); But my database name is depends on user input. How can I set $useDbConfig variable value. Like I made a module Task and cont

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-22 Thread Rick
Another database really isn't an option as I said this is an existing MySql instance. Yeah, I could do raw queries but I wanted to taste the cakey goodness. Rick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-22 Thread RichardAtHome
Have you checked out Easysoft's SQLEngine? It allows heterogeneous joins across databases and even across different RDBMs? As an alternative, you could always use $this->model->query(); and enter the SQL by hand. You'll loose a lot of cakey goodness though :-( On Sep 22, 3:19 pm, Bookrock <[EMAI

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-22 Thread Bookrock
I am facing same problem On Sep 21, 5:56 pm, Rick <[EMAIL PROTECTED]> wrote: > I tried that technique but it did not work.  It appears that you can't > havemultiple"useDBConfig"s in a single query.  This seems reasonable > since you also can't do a raw select usingmultipleconnections which > is w

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-21 Thread Rick
I tried that technique but it did not work. It appears that you can't have multiple "useDBConfig"s in a single query. This seems reasonable since you also can't do a raw select using multiple connections which is what the useDBConfigs give you (I think). Richard On Sep 20, 5:56 pm, Adam Royl

Re: Accessing multiple databases within a single Mysql instance in a single query.

2008-09-20 Thread Adam Royle
What you need to do is set $useDBConfig for each model. var $useDBConfig = 'A'; then in your DATABASE_CONFIG you would use var $A = array( 'driver' => 'mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'usern

Accessing multiple databases within a single Mysql instance in a single query.

2008-09-20 Thread Rick
I've got an existing MySql instance that contains 4 databases (lets call them A, B, C & D). Each has tables as you would expect. For this post lets say tables are named like table1, table2 etc.. in each database. My single user/password has access to all databases in the instance. My problem i