note 77688 deleted from function.mysql-connect by nlopess

From: Date: Sun, 09 Sep 2007 12:00:08 +0000
Subject: note 77688 deleted from function.mysql-connect by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-130327@lists.php.net to get a copy of this message
Note Submitter: ElCoder ---- I needed a method to list open mysql connection and I found a trick that might work! If the coder saves the mysql link value to a variable it can be found and used with get_resource_type! I wrote a function that scans through GLOBALS (in depth if you need) and finds assigned mysql links. Go to : http://www.tellinya.com/art2/102/list-mysql-links and get the code plus some explanations. Hope it helps someone as it is the only way I found to do this without using mysql_* functions which attempt re-connect anytime used when connections not found. That's not cool! PS: if you have a better idea which does not try to establish a connection if not found I look forward to comments. Thanks!

« previous php.notes (#130327) next »