I'm getting this a strange MySQL error that I have never seen before. I have the following code:
$labelQuery = "SELECT ID FROM labels WHERE name = $mylabel";
$labelResult = mysql_query($labelQuery) or die("Invalid query: " . mysql_error().__LINE__);
Which produces the following error message:
Invalid query: Unknown column '3p' in 'where clause'464
The strange thing is that '3p' is not the column name, but rather the criteria that i am using for the 'name' column. The $mylabel variable is fetched from another query run earlier as:
$mylabel = $row['label'];
Any ideas? Any help would be greatly appreciated! Thanks!!!
PS: The error shouldn't have to do with quotes used in the query string. I've tried every combination there.