#29645 [Opn->Fbk]: How can we test mysql connection is already established or not?
| From: | tony2001@php.net | Date: | Tue, 17 Aug 2004 10:50:36 +0000 |
| Subject: | #29645 [Opn->Fbk]: How can we test mysql connection is already established or not? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64778@lists.php.net to get a copy of this message | ||
ID: 29645
Updated by: tony2001@php.net
Reported By: sivalsm at yahoo dot com
-Status: Open
+Status: Feedback
-Bug Type: *Database Functions
+Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: 5.0.1
New Comment:
Could you please explain what and why do you need?
mysql_connect & friends doesn't establish new connection, if a
connection with the same parameters was established before in this
script.
Previous Comments:
------------------------------------------------------------------------
[2004-08-13 09:26:06] sivalsm at yahoo dot com
Description:
------------
I think it will be great, if we had a database function to check
whether database connection is already exist or not for a particular
session.
Naturally we are using a common php file to connect to database and we
are inclusing the file in every script.Anyway database connection will
lost after completing the execution of the script.But we need to
connect database again and again.
If there is a database function like mysql_isconnected, to check
whether database connection is already established or not...that will
be helpful.
Expected result:
----------------
We can use mysql_pconnect to maintain persistancy in database
connections.But it will take server resources to maintain
persistancy.So if there is a seperate mechanism to check the database
connection it will be better.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29645&edit=1