RE: [PHP-DB] Making a Querry on two db possible?

From: Date: Wed, 02 Jan 2002 15:27:00 +0000
Subject: RE: [PHP-DB] Making a Querry on two db possible?
Groups: php.db 
Request: Send a blank email to php-db+get-15309@lists.php.net to get a copy of this message
Perhaps something like: $query = "SELECT db1.table1.*,db2,table1.* FROM db1.table1,db2.table1 WHERE db1.table1.field=db2.table1.field"; $result = mysql($query) or die("Error:".mysql_error()); -----Original Message----- From: Andy [mailto:news.letters@gmx.de] Sent: Wednesday, January 02, 2002 9:22 AM To: php-db@lists.php.net Subject: [PHP-DB] Making a Querry on two db possible? Hi there, I have two tables in two different db. Now I have to compare those records. How can I do this from PHP? As I know I have to connect to the db first, than make the querry. How can I compare them? Is there another way, than first writing the data into an array and then comparing? Cheers 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 (#15309) next »