Trying to run a query, keep getting ERROR 1054:
SELECT *
from my_table
WHERE 1=1
AND MYCITY = CHICAGO
;
Now, I use WHERE 1=1 and AND because I’m running multiple arguments. This is the only argument that clods everything up. The error is reads in its entirety:
ERROR 1054 (42S22): Unknown column 'CHICAGO' in 'where class'
It’s looking for column CHICAGO instead of the value CHICAGO in column MYCITY and I don’t know why.
Need to quote your string value