note 45867 deleted from function.mysql-select-db by tomsommer
| From: | tomsommer@php.net | Date: | Wed, 22 Sep 2004 19:28:46 +0000 |
| Subject: | note 45867 deleted from function.mysql-select-db by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77172@lists.php.net to get a copy of this message | ||
Note Submitter: kenneth at ks81 dot com
----
For use with to databases in one query:
$dbcnx1 = mysql_connect ( 'localhost', 'username', 'password',
'dbcnx1')
$dbcnx2 = mysql_connect ( 'localhost', 'username', 'password',
'dbcnx2')
$db1 = mysql_select_db ( 'db1', $dbcnx1)
$db2 = mysql_select_db ( 'db2', $dbcnx2)
$sql = 'SELECT db1.tbl1.row1,db2.tbl2.row2 FROM db1.tbl1,db2.tbl2';
$array = mysql_fetch_array(mysql_query($sql));