We've been considering the following implementation of a class pointer
within another class. Our goal here is to minimize the number of database
connections per function call. It seems to work just fine, but I wanted to
post this up for comments. PHP 4.1.1 doesn't seem to have a problem with
it. We have a couple classes working this way in some of our beta code.
I've never seen anyone do this before so I just wanted to make sure we
weren't wandering into uncharted waters.
$this->test = $test;
$this->db_class = new database_class(DB_NAME);
... use db here via $this->db_class ...
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php