Page 1 of 1

Selecting and joining across multiple databases

Posted: Thu Feb 21, 2008 11:34 am
by sublimenal
I have a problem here.

I have 3 databases that sit ont he same server, I can access the databases seperatly find but what I need to do is access all 3 at the same time. All 3 databases have the same schema. Is it possible to do this? Here is my setup:

My 3 databases: wcmporg_db , alife_db and puritan_db

Here was my thought process on this but it doesnt work

Code: Select all

"SELECT * FROM puritan_db.main,wcmporg_db.main,alife_db.main  ORDER by main.burial_date desc  limit $offset,$limit"
Any help would be appreciated

Re: Selecting and joining across multiple databases

Posted: Thu Feb 21, 2008 12:00 pm
by Christopher
Are the things three databases or three tables in a database?

Re: Selecting and joining across multiple databases

Posted: Thu Feb 21, 2008 12:03 pm
by sublimenal
its 3 different databases they all sthe same schema in each database

Re: Selecting and joining across multiple databases

Posted: Thu Feb 21, 2008 1:46 pm
by sublimenal
hmm is it not possible in php?