Re: Reusing MySQL Connections - Can it be done?
| From: | Monty | Date: | Mon, 05 Apr 2004 22:18:28 +0000 |
| Subject: | Re: Reusing MySQL Connections - Can it be done? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182411@lists.php.net to get a copy of this message | ||
> A define is pretty much for strings only, not objects or resources. Try
> using $GLOBALS['_CONNECT_DB'] instead.
I tried this, but, same results. If I store the Resource ID from a
mysql_pconnect() in $GLOBALS['_CONNECT_DB'] and then call...
mysql_query($query, $GLOBALS['_CONNECT_DB']);
PHP gives me the following error:
4 is not a valid MySQL-Link resource
When I look into this var, here's what I see:
Resource id #4
This is the same that was stored in the constant var, so, it appears that
whether it's a Global or Constant isn't making a difference.