Re: Connecting to multiple DB's

From: Date: Mon, 01 Apr 2002 18:51:49 +0000
Subject: Re: Connecting to multiple DB's
Groups: php.general 
Request: Send a blank email to php-general+get-90994@lists.php.net to get a copy of this message
Not sure about the multiple connections side, but to kill a connection: mysql_close($link); where $link is your connection variable/string hope this helps. -Patrick
From: James Taylor <jtx@nestllc.com> Reply-To: jtx@nestllc.com To: PHP List <php-general@lists.php.net> Subject: [PHP] Connecting to multiple DB's Date: Mon, 01 Apr 2002 10:47:45 -0800 I host a few sites, and on usually each site will have it's own MySQL database in the background. I've decided that I want to link one site to another, and need to connect to more than one database at a time. I've found that when I try to connect to 2 or more, even if I assign the other database to another variable (ie . $db1 = @mysql_connect($dbhost, $dbuser, $dbpass); $db2 = @mysql_connect($dbhost2, $dbuser, $dbpass); ) , the last connect called is the only one that is active. Any work arounds to this? I've been having to do it where I connect to one when needed, then connect to the other, etc. I'm thinking there has to be a better way to do this. Also, what is the function to kill a connection to a db? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com

« previous php.general (#90994) next »