Re: Re: Global variables in a class? Nested classes VS inheritance...
| From: | trlists at clayst dot com | Date: | Thu, 18 Mar 2004 03:02:51 +0000 |
| Subject: | Re: Re: Global variables in a class? Nested classes VS inheritance... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180779@lists.php.net to get a copy of this message | ||
On 17 Mar 2004 Brent Westmoreland wrote:
> I too have questions on how to handle this situation, any help would be
> greatly appreciated.
[Situation was how to use a single database connection inside a class
nested within another class etc.]
If you have a single DB connection open for the entire script why not
use a global variable? There are good reasons for not overusing global
variables but sometimes there are good reasons to use them too.
--
Tom