See the new_link parameter option for mysql_connect. It should solve your problem. On the other hand, what you are doing is fine, I did it for my pool since I can't use the new_link option because I'm retaining compatibility back to PHP 4.1.2
Cheers, Rob. dorgon wrote: > > for better understanding: > > <phpCode> > $conn1 = mysql_connect("localhost", "user", "pwd"); > mysql_select_db("database1", $conn1); > > $conn2 = mysql_connect("localhost", "user", "pwd"); > mysql_select_db("database2", $conn2); // select two diff. DBs > > echo $conn1."<br>"; > echo $conn2."<br>"; > </phpCode> > > returns: > Resource id #2 > Resource id #2 > > BUT: > $conn1 = mysql_connect("127.0.0.1", "user", "pwd"); > mysql_select_db("database1", $conn1); > $conn2 = mysql_connect("localhost", "user", "pwd"); > mysql_select_db("database2", $conn2); // select two diff. DBs > > ...returns two different resource IDs (which I'd like to have). > > When using mysql_pconnect I'm always getting correctly different > resource ids. > > /dorgon > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- .---------------------------------------------. | Worlds of Carnage - http://www.wocmud.org | :---------------------------------------------: | Come visit a world of myth and legend where | | fantastical creatures come to life and the | | stuff of nightmares grasp for your soul. | `---------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php