Re: mySQL overhead: Tweaking Scripts for Speed
| From: | CPT John W. Holmes | Date: | Fri, 05 Sep 2003 17:19:26 +0000 |
| Subject: | Re: mySQL overhead: Tweaking Scripts for Speed | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161790@lists.php.net to get a copy of this message | ||
From: "Dan Anderson" <dan@mathjunkies.com>
> > While multiple connections will just return the first connection,
anyhow,
> > why do the extra work, right?
>
> Yes that was what I was thinking. But I was also thinking that I would
> need to global the $link and $db variables and run mysql_query() with
> them in options. So I'm wondering how much work coding it will save.
> Or will it default to the mysql connection active in the main program?
It'll default. You only need to pass $link and $db to mysql_query() and the
other functions when you have multiple connections open to multiple
databases at the same time (something that is rarely needed).
---John Holmes...