Re: Connecting To Multiple MySQL Databases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



NathanielGuy#21 wrote:
I know this may be slightly off topic for a PHP listserv but I cant
find my answer anywhere else.  I start off generating a page connected
to one database as a certain user and I call a script that requires a
connection to a second database as a different user.  Is there any way
I could open that connection while maintaining the current one aswell?
 The connection of the script is opend and closed before any more of
the other page is generated.  Im not sure how to go about solving this
problem other than rewriting my script.  Any ideas?

--nathan


I'm a bit new myself, but why not call the resources seperate names?

$sql1 = mysql_connect($host1, $user1, $pass1);

$sql2 = mysql_connect($host2, $user2, $pass2);


Hope that helps -dant

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux