Forum Moderators: coopster

Message Too Old, No Replies

Join Tables in two databases

is this possible?

         

omoutop

10:19 am on Sep 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello all,

i have come across a time consuming problem....
we have moved some of our tables in the database into a new one (but on the same server).

In my php pages i used a lot the JOIN syntax in my queries... now some tables are moved to the new database.

So the "join" queries stoped working.... Is there a way to use the JOIN between the two databases or I must re-write the code?

Any help is welcome and thanks in advance

coopster

4:40 pm on Sep 29, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Depends on the Database being used. If it is MySQL, then yes, you can do so if the user making the connection has read permissions on both tables in both databases. You will need to fully qualify the table using database.table syntax.