Bug #12432 Updated: not valid mysql ressource

From: Date: Sat, 28 Jul 2001 00:43:22 +0000
Subject: Bug #12432 Updated: not valid mysql ressource
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-61285@lists.php.net to get a copy of this message
ID: 12432 Updated by: mfischer Reported By: etm@wkv.at Old Status: Open Status: Closed Bug Type: MySQL related Operating System: GNU Linux PHP Version: 4.0.6 New Comment: This is currently a feature. Although you haven't given full source I assume both 'mysql_connect()'s were the same. Two or more connects with the same parameter reuse the allready established connection and don't create a new one. So, closing one of them closes all other, too. Re-Open if my assumption were wrong. Previous Comments: ------------------------------------------------------------------------ [2001-07-27 13:31:35] etm@wkv.at $eLink = mysql_connect(...); . . . class test { function einTest() { $eLink = mysql_connect(); mysql_close($eLink); } } $aVar = new test(); $aVar->einTest(); mysql_query("...",$eLink); -----> not valid mysql ressource After einTest() it looks like it closes the outside mysql_connection ($eLink) no matter how the connection var in einTest() is named! Serious stuff! ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12432&edit=1

« previous php.dev (#61285) next »