2
Contributors
1
Reply
14
Views
1 Year
Discussion Span
Last Post by cereal
1

Hi,

  • is the second database in the same server of the first database?
  • if affirmative: do you access with same credentials?
  • if affirmative: do you have same permissions?

If it is all affirmative then you can access the second database from the same connection to the first database, just prepend the table name with the database, as in the following example:

SELECT `database1`.`table`.`attribute`, `database2`.`table`.`attribute` FROM `database1`.`table`, `database2`.`table`;
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.