Hello,

I'm lookin for some tips on the best way to do this...

I make a database connection outside of my classes... lets call it
$myDBConnection. I need to use this connection in a class nested in a
class... Was wondering the most efficient way of doing this? I don't want to
create a new db connection in the class. I want to use the existing one...

If no one has a better Idea I'll pass the connection through the constructor
of the first class, and then again into the constructor of the nested
class... then I can query and use the database connection as
$this->myDBConnection.... Just wanted to avoid that because there's about 5
db connections I'll have to pass in...

Any thoughts? Would it make things easyer if the base class inherited all
nested classes instead of nesting them?

Any help would be appreciated.

Thanks

-Dennis



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to