RE: [PHP] Connection to Two databases simultaneously
| From: | Kim Madsen | Date: | Mon, 04 Apr 2005 11:39:08 +0000 |
| Subject: | RE: [PHP] Connection to Two databases simultaneously | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-212160@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: HarryG [mailto:harry1980@gmail.com]
> Sent: Saturday, April 02, 2005 6:29 AM
> I am connecting to two database in my index.php.
If the 2 databases are on the same mysql server and the MySQL user has access to both databases, You
can easily use join:
Select name FROM db1.members, db2.addresses WHERE db1.members.id = db2.addresses.member_id
It´s been a while(years!) since I´ve used this, so I´m sorry if the syntax ain´t correct.
--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/systemdeveloper