Not a Valid MySQL-Link Resource
| From: | Stephen | Date: | Sat, 19 Oct 2002 20:28:42 +0000 |
| Subject: | Not a Valid MySQL-Link Resource | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-120622@lists.php.net to get a copy of this message | ||
Hello,
I'm having some trouble understanding this error I'm getting. Here's the error:
Warning: mysql_query(): supplied resource is not a valid MySQL-Link resource in
c:\phpdev5\www\newsletter\index.php on line 38
Now here's the block of code that goes into the query:
$key = $HTTP_GET_VARS['key'];
$email = $HTTP_GET_VARS['email'];
$sql = "SELECT * FROM users WHERE key='$key' AND email='$email'";
$query = mysql_query($sql, $main);
Please help!
Thanks,
Stephen Craton
http://www.melchior.us
http://php.melchior.us