note 26816 added to function.mysql-connect
| From: | polojoey at yahoo dot com | Date: | Wed, 13 Nov 2002 22:50:39 +0000 |
| Subject: | note 26816 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39459@lists.php.net to get a copy of this message | ||
Which is better? Opening a connection and closing it as soon as possible, or letting PHP handle it?
In one of my scripts, I make several SELECT queries against the database, should I open the
connection once (for a longer time), then run the multiple SELECT queries then close it, or should
make a connection and close it per query (free up the connection?).
--
http://www.php.net/manual/en/function.mysql-connect.php
http://master.php.net/manage/user-notes.php?action=edit+26816
http://master.php.net/manage/user-notes.php?action=delete+26816
http://master.php.net/manage/user-notes.php?action=reject+26816