danjen
asked on
Is is possible to create a single query that accesses two databases in MYSQL
Hi Experts-
I am hoping someone can tell me if this is possible.
I am running multiple websites for a common industry. Much of the product information is the same. I would like to have 1 database that accesses all of the product information and a separate database for each client that manages the brands they carry and the prices. Is it possible to create a single query that accesses both of these databases? The query would need to access the product information from one database and the pricing from another. I am not looking to do a union. That wouldn't work.
Thanks for your help.
I am hoping someone can tell me if this is possible.
I am running multiple websites for a common industry. Much of the product information is the same. I would like to have 1 database that accesses all of the product information and a separate database for each client that manages the brands they carry and the prices. Is it possible to create a single query that accesses both of these databases? The query would need to access the product information from one database and the pricing from another. I am not looking to do a union. That wouldn't work.
Thanks for your help.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Both of your answers were helpful and I was able to achieve the result I needed.
Thanks!
Thanks!
http://www.dottedidesign.com/node/14
Basically you access the tables via database_name.table_name and the columns via database_name.table_name.c