note 47865 added to function.mysql-close

From: Date: Fri, 03 Dec 2004 09:26:14 +0000
Subject: note 47865 added to function.mysql-close
Groups: php.notes 
Request: Send a blank email to php-notes+get-81309@lists.php.net to get a copy of this message
Be careful when using multiple links to connect to same database (with same username). Unless you specify explicitly in mysql_connect() to create a new link, it will return an already open link. If that would be closed by mysql_close(), it will also (obviously) close the other connection, since the link is the same. Had lot of trouble figuring it out, since in <=4.3.6 there was a bug which didn't close the connection, but after the patch to >=4.3.7, all my application broke down because of a single script that did this. ---- Manual Page -- http://www.php.net/manual/en/function.mysql-close.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47865 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47865&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47865&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47865&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47865&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47865&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47865&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47865&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#81309) next »