Re: [PHP] Connection to Two databases simultaneously

2005-04-02 Thread Jochem Maas
HarryG wrote: Hi, I am connecting to two database in my index.php. Here is how: @ $db = mysql_connect("localhost", USERLOGIN, USERDBPASS); if (!$db) { print "Error: Could not connect to database. Please try again later."; exit; } mysql_select_db(DATABASE); @ $userdb = mysql_connect("localhost"

Re: [PHP] Connection to Two databases simultaneously

2005-04-02 Thread Dan Rossi
both db's on the same host ? I would try select * from second_db2.theothertable :) On 02/04/2005, at 6:53 PM, Jochem Maas wrote: HarryG wrote: Hi, I am connecting to two database in my index.php. Here is how: @ $db = mysql_connect("localhost", USERLOGIN, USERDBPASS); if (!$db) { print "Error: Co

RE: [PHP] Connection to Two databases simultaneously

2005-04-04 Thread Kim Madsen
> -Original Message- > From: HarryG [mailto:[EMAIL PROTECTED] > 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