Re: Not a Valid MySQL-Link Resource

From: Date: Sat, 19 Oct 2002 20:33:58 +0000
Subject: Re: Not a Valid MySQL-Link Resource
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-120623@lists.php.net to get a copy of this message
What's $main? What does you connection string look like? Stephen wrote:
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


« previous php.general (#120623) next »