Quote:
Originally Posted by Varius
Will it be on the same server? If so, you can have different databases and access them without opening new connections. Cross-database joins also work fine in mysql.
Example:
you create three databases: common, site1, site2
You can do queries such as:
SELECT a.field1, a.field2, b.field2 FROM site1.table1 a JOIN common.table1 b ON a.field1=b.field1;
Basically, in your queries that use more than one database just have the dbname in the query before the table name.
Hope that answers your question.
|
I've never tried cross database joins.. I'll have to give that a go as that would work very nicely. How do you handle the DB connections in this case? Which linkid would you use?