note 65956 deleted from function.mysql-select-db by danbrown

From: Date: Wed, 17 Jun 2009 14:42:54 +0000
Subject: note 65956 deleted from function.mysql-select-db by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-156993@lists.php.net to get a copy of this message
Note Submitter: matsko at rogers dot com ---- Just incase the mysql_select_db() function still won't work with multiple database connections (as has happened to me before). $dbh1 = mysql_pconnect($host,$user,$pass); $dbh2 = mysql_pconnect($host,$user,$pass); You could do this... mysql_query("USE database1",$dbh1); mysql_query("Use database2",$dbh2); This does the same thing as the mysql_select_db() function... or this... You don't even have to select the database for each connection. mysql_query("SELECT * FROM database1.table",$dbh1); mysql_query("SELECT * FROM database2.table",$dbh2);

« previous php.notes (#156993) next »