Probably.  However, you'll have to global($connection_obj) in each function
to allow access to that.  I think newer versions of PHP have an auto registering
global namespace, however, and you may not need that global() call anymore.

Why would you want to?  I believe the PHP/Zend engine has pooling capabilities,
so it's not really any overhead to "reconnect."  If no pooling is available, then you
limit yourself (and your webserver) to a single connection. (Will kill your 




----- Original Message ----- 
From: "Shaun Johnston" <[EMAIL PROTECTED]>
Sent: Wednesday, May 01, 2002 5:03 PM
Subject: [PHP-DB] Global Connection object

> Is it possible to make a MySQL connection object global, so that it doesn't
> need to be declared as a parameter to be accessed from individual functions?
> -- 
> PHP Database Mailing List (
> To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to