ID:               29645
 User updated by:  sivalsm at yahoo dot com
 Reported By:      sivalsm at yahoo dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: Linux
 PHP Version:      5.0.1
 New Comment:

Thank you for your reply.At this point of time no new connection will
be established in the same script.But while i'm using mysql_connect in
every script , then new connection will be established for every
occurrance of mysql_connect.

What i'm thinking is by taking session_id and other database
information ..the function should not prepare a new connection for the
same parameters.So that only one connection will be available for a
single session.

We need to check whether database connection is established or not?


Previous Comments:
------------------------------------------------------------------------

[2004-08-17 12:50:35] [EMAIL PROTECTED]

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.


------------------------------------------------------------------------

[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

Reply via email to