Hey Bakers!

Is it possible to utilize cakePHP for setups with cross database
joins?

F.ex. 3 Databases: "crm", "monitoring", "helpdesk".

I then want to find a specific Customer (stored in "crm") join with
all associated "Host" (stored in "monitoring"), and lastly join
"Ticket" (stored in "helpdesk").

In plain vanilla it would be something like:

SELECT h.*, c.*, t.*
FROM monitoring.hosts AS h, crm.customers AS c, helpdesk.tickets
WHERE
c.id = 'some_int' AND
h.cust_id = c.id AND
t.cust_id = c.id

I've tried using "useDbConfig" and playing around with my database
configuration (persistent connection) But i get errors like "SQL Error
in model xxx:".
I then tried specifying a table prefix (thinking appending the
database would be a fix) but then i just got errors like "No Database
table for model XXX (expected "myPrefix.xxx"), create it first.".

I found in the manual that it's possible to perform custom SQL in the
model (like the plain vanilla sql above), but since my entire app is
split into subsystems on DB level then i would not really gain much
advance in using cakePHP since i wouldn't get all those nifty features
that i am longing :)

And the short version is:
Please help me!
Is it possible to utilize cakePHP for setups with cross database
joins?

Thanks,
Simon


--~--~---------~--~----~------------~-------~--~----~
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