note 48592 added to function.mysql-close

From: Date: Fri, 31 Dec 2004 14:02:58 +0000
Subject: note 48592 added to function.mysql-close
Groups: php.notes 
Request: Send a blank email to php-notes+get-82506@lists.php.net to get a copy of this message
The mysql_close() call does seem to behave strangely when I make use of a nested call to a function that also connects to the database. I am iterating through some results to a select, and with each row of the results I'm executing a separate function. This function also talks to the database and at the end of the parent iteration I get an error with the mysql_close() call. It seems to me that this is something in the region of issues with variable localisation. It seems that MySQL doesn't mind if you don't close the link. This smells a little dangerous to me but when I removed the mysql_close() call at the end of the parent loop all worked. Me thinks that things should not really be like this. I'm a child of perl ... there must be a way to open and close database connections without running into issues with multiple concurrent connections. ---- Manual Page -- http://www.php.net/manual/en/function.mysql-close.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48592 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48592&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48592&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48592&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48592&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48592&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48592&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48592&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#82506) next »