I also faced the issue of "Unknown column in where clause" when executing the following from linux (bash) command line.
mysql -u support -pabc123 -e 'select * from test.sku where dispsku='test01' ; '
This is what I got
ERROR 1054 (42S22) at line 1: Unknown column 'test01' in 'where clause'
I had to replace the single quotes 'test01' with double quotes "test01" . It worked for me. There's a difference how and the way you're executing sql queries.
When assigning a value to a variable in a script and later, using that variable in a sql statement that has to be executed by the script, there's slight difference.
If suppose variable is
var=testing
and you want to pass this value from within script to mysql, then single quotes work.
select '$var'
So different engines might evaluate backticks and quotes differently.
This is my query that worked from linux command line.
mysql -u support -pabc123 -e 'select * from test.sku where dispsku="test01" ; '