Error: 1 is not a valid mysql link resource
| From: | Rafael Steil | Date: | Wed, 24 Oct 2001 17:31:45 +0000 |
| Subject: | Error: 1 is not a valid mysql link resource | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-72108@lists.php.net to get a copy of this message | ||
Hi all.
With php version 4.0.1, I made a database class. I use a function called
connect() to open database connection to mysql, and the link resource is
stored in $GLOBALS["CONNETION_ID"] global variable. All of code work
perfectly, with no any problems..
But when I upgraded to php version 4.0.6, the code wasn't work at all. The
error returned is
Warning: 1 is not a valid MySQL-Link resource in
/usr/local/apache/htdocs/Produtora/manole/config/site/database.class.php on
line 190
the line 190, in this case, is just
$data = mysql_query($sql, $GLOBALS["CONNECTION_ID"])
it is the same code that works with php 4.0.1,, The link resource is valid (
at least I think that ), because when I do
echo $GLOBALS["CONNECTION_ID"];
the return is
Resource id #1
does anyone knows the problem???
thanks anyway,
Rafael Steil