Ok, I'm trying to select a row from my database using a unique "key". The problem is for some reason every time I try I get this response.
"You have an error in your SQL syntax near 'key = '00ddcbf73805288e19044a1efc853ed5'' at line 1"
Here is my statement...
$sql = "SELECT * FROM tablenamehere WHERE key = '$key'";
The field type for key is longtext, I don't know if it matters or not.
"00ddcbf73805288e19044a1efc853ed5" is a sample key that I'm using.
So basically I'm trying to figure out why it won't me select using key as my where. If I switch the where part to another field it works fine, so I know its not my syntax. I've been switching things and trying every possible combination for hours now and can't get it to work so any input is appreciated.
Thanks,
Ryan