I agree, he may be trying to match known field values to a variable-specified column, which would be totally valid, however, testing on my system if I switch the order of column name and value, I get this:feyd wrote:I'm pretty sure that is perfectly valid.ReverendDexter wrote:And is it intentional that your variable is the column name instead of the value?
Code: Select all
SELECT *
FROM cities
WHERE 'chico' = city
LIMIT 0 , 30
Code: Select all
MySQL said:
#1054 - Unknown column 'city' in 'where clause'