Unknown column 'value2' in 'field list'
Based on the error reported by MySQL: value1
and value2
should be within single quotes as 'value1'
and 'value2'
.
UPDATE: The reason there are no quotes around the values in the query seems to be because the values that are being pulled from the XML are not exactly strings. Typecasting the results to string should ensure that the query parser quotes the values.