Re: Scope of Variables and use of global and this->var
| From: | Eddie Drapkin | Date: | Thu, 16 Jul 2009 13:54:47 +0000 |
| Subject: | Re: Scope of Variables and use of global and this->var | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295463@lists.php.net to get a copy of this message | ||
On Thu, Jul 16, 2009 at 9:53 AM, Govinda<govinda.webdnatalk@gmail.com> wrote:
>
> On Jul 15, 2009, at 3:28 PM, tedd wrote:
>
>> My way -- every time I open a database, I do so by including the
>> configuration.php file that holds the logon/password et other data to
>> connect with the database. When I'm done with what I want from the database,
>> I close it.
>
> If one does not close it, then what are the consequences? And do any
> consequences persist, and how? Or is it just a consideration for a limited
> time? What limits the risk?
> In case there is a good article about this, I'd love a link..
>
> Thanks!
> -G
>
>> Cheers,
>>
>> tedd
>
If you're not using persistent connections, they'll all get closed
when the script completes.