Re: mysql_connect() with a multi-file format
| From: | Chris Ramsay | Date: | Wed, 22 Jun 2005 15:25:07 +0000 |
| Subject: | Re: mysql_connect() with a multi-file format | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-39746@lists.php.net to get a copy of this message | ||
> I read in the php.net manual that the connection closes automatically
> when the script exits. Does this mean I can't open a db connection in
> one file and pass the link around from function to function?
No, the script you include becomes part of the main script calling the
inclusion, therefore the connection stays open 'til you explicitly
close it, or your main script exits.
cheers