Instruct ICC wrote:
From: Joaquín <[EMAIL PROTECTED]>
I need query tables that are in two different databases
$result_t1 = mysql_query("SELECT * FROM `Table1inDB1`",$conn_1);
$row_t1 = mysql_fetch_assoc($result_t1);
$result_t2 = mysql_query("SELECT * FROM `Table2inDB2`",$conn_2);
$row_t2 = mysql_fetch_assoc($result_t2);
Although Joaquín said his issue is [Fixed], I write these queries as:
SELECT * FROM DB1.TableInDB1
SELECT * FROM DB2.TableInDB2
(with and without link_identifiers I believe), so I was wondering about
If you only ever deal with mysql then you'll be fine. Other databases
may or may not support this feature.
The other problem could be user 'A' has access to DB1 but no access to DB2.
So you have to connect as user 'B' to be able to read from DB2.
So - as usual - "it depends" is the answer.
Postgresql & php tutorials
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php