I am having a problem using the MD5 function in MySQL with PHP. An encrypted value is passed via the URL, and is used as part of the WHERE clause in the INSERT statement.
$queryStr = "SELECT COUNT( userID ) AS vcount FROM users WHERE userID = '{$GET['id']}' AND md5(firstName) = '{$GET['vcode']}'";
$sql = mysql_result(mysql_query($queryStr),0);
The query runs in MySQL using MD5 on the column, but I get an error in PHP.
Error with MySQL query Unknown column 'id' in 'where clause'
Any help or suggestions would be apreciated.