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:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 9:22 AM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to