4.1.0RC5 -- mysql_select_db() ?

From: Date: Mon, 03 Dec 2001 17:36:07 +0000
Subject: 4.1.0RC5 -- mysql_select_db() ?
Groups: php.qa 
Request: Send a blank email to php-qa+get-4158@lists.php.net to get a copy of this message
Derick and Zak will be happy, Zeev not so much... When you open 2 connections using mysql_pconnect(), although 2 resources are created, only one is taken into account. It seems that the second argument of mysql_select_db() is not taken into account. Instead, the last chosen db is used. I understand this for non-persistent connections, as the last open one is always taken. But for pconnect(), as it creates a different resource -- at least it says so -- db handlers should be taken. I browsed the manual for persistent connections and mysql_pconnect(). For the latter we have : "First, when connecting, the function would first try to find a (persistent) link that's already open with the same host, username and password. If one is found, an identifier for it will be returned instead of opening a new connection." This has been reported for earlier versions but I didn't find a suitable bug report. Also, the documentation seems confusing to me about the real behavior of pconnect. As I understand it, either the same resource ID should be returned, or a different one -- as it seems to be now -- should be fully honored. You can see an example at http://php.hellekin.com/test/test-mysql_dual_connect.php hellekin

« previous php.qa (#4158) next »