RE: MySQL: CRITICAL problem
| From: | Simon R Jones | Date: | Fri, 11 May 2001 07:30:28 +0000 |
| Subject: | RE: MySQL: CRITICAL problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9243@lists.php.net to get a copy of this message | ||
> The connection has already been established, and some data read from
> database without problem. The connection was not closed, rather
> left alive.
> Now...
> Why this happens when I try to execute additional query? Help, anyone!
the connection variable is not global, so the function your MySQL statement
is in cannot access it. to access a variable outside of a function write
global $connection;
or something similar (whatever the name of your MySQL connection handle) as
the first line of your function :-)
simon
-------------------------------------------
Studio 24 Ltd | tel. 01223 501 892
PO Box 88 | fax. 0870 063 1216
Cambridge | mob. 07974 074 547
CB4 1XH | www.studio24.net