RE: [PHP-DB] How to querry two db in a single statement?

From: Date: Fri, 04 Jan 2002 14:19:29 +0000
Subject: RE: [PHP-DB] How to querry two db in a single statement?
Groups: php.db 
Request: Send a blank email to php-db+get-15390@lists.php.net to get a copy of this message
You need to provide more info than you have. Assume you have two databases, named DB1 and DB2. In each database, you have a table, named "mytable", in which there are fields, named "field1" and "field2" that you'd like to compare. After opening the databases, you may perform the following: SELECT * FROM DB1.mytable,DB2.mytable WHERE DB1.mytable.field1=DB2.mytable.field1 && DB1.mytable.field2=DB2.mytable.field2; Each reference may be broken down into: <database>.<tble>.<field> -----Original Message----- From: Andy [mailto:news.letters@gmx.de] Sent: Friday, January 04, 2002 7:50 AM To: php-db@lists.php.net Subject: [PHP-DB] How to querry two db in a single statement? Hi there, I would like to make a querry on 2 db. There is info in tables I would like to compare. As I know, there has first to be a conect on the db before the querry. But how to do this on 2 db?? Thanx for any help. Andy -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#15390) next »