Posted by Larry in Honolulu on 12/08/06 23:10
I'm getting an error message that makes no sense to me. I have a table with a
field named 'testkey' for a list of "keys" in the form of ABC10102. I have a
php variable holding a specific key number.
The relevant code is -
$_testkey = 'LAL10102';
$sql = "SELECT * FROM `pro_keys` WHERE `keynum`=`$_testkey`";
$result=mysql_query($sql,$db_conn);
echoing the $sql gives -
SELECT * FROM `pro_keys` WHERE `keynum`=`LAL10102`
But I get the following error -
MySQL error #1054 - Unknown column 'LAL10102' in 'where clause'
?????????
Thanks for any ideas,
Larry L
[Back to original message]
|