Query 2 MySQL databases in 1 statement



I was wondering how it may be possible to query 2 MySQL databases using
one query statement from PHP.

For instance: SELECT database1.tableA.field1 UNION
database2.tableB.field2.

My concern is, when connecting to MySQL (or sending a query), I only
specify 1 database connection resource ID. How does that play out when
connecting to 2 databases?

Thanks.

.



Relevant Pages

  • Re: Query 2 MySQL databases in 1 statement
    ... SEPARATE queries accessing two different databases. ... one query statement from PHP. ... My concern is, when connecting to MySQL, I only ... Más sabe el diablo por viejo que por diablo. ...
    (comp.lang.php)
  • Re: Query 2 MySQL databases in 1 statement
    ... SEPARATE queries accessing two different databases. ... one query statement from PHP. ... My concern is, when connecting to MySQL, I only ... Más sabe el diablo por viejo que por diablo. ...
    (comp.lang.php)
  • Re: Want help with database diagnostics tool design.
    ... Filter 2 Query ... what kind of databases you are trying to diagnose. ... any complicated n-tier solutions to this kind of application. ...
    (comp.lang.pascal.delphi.databases)
  • Re: Opening table - query running?
    ... That's actually the way relational databases, not just Access, ... unless you impose order by using a query with an order by clause. ... the rows will be returned in primary key sequence because Jet ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Error in Index Reorg in Maintenance Task
    ... Turned Allow Page Lock off and tried re-org. ... Page locking need to be enables for ALTER INDEX ... Backup Databases ... Failed:Executing the query "ALTER INDEX ...
    (microsoft.public.sqlserver.server)