popkutt February 2016

#1054 - Unknown column in 'field list' Is minus sign a special character in MySQL?

Trying to insert some data:

INSERT INTO `ps_product_check`(`id_product`, `name`, `catalog`)     
VALUES  (30767,'CT39-235126','79926330')

The error is

 #1054 - Unknown column 'CT39' in 'field list' 

Why does it think CT39 is supposed to be a column when it is (a part) of a value? How to get around this error?

Answers


Bernd Buffen February 2016

I run your query and it works very fine.

INSERT INTO `ps_product_check`(`id_product`, `name`, `catalog`)     
VALUES  (30767,'CT39-235126','79926330')

It is possible that you have placed other quotes (backticks) in the query executed.

If I change the quotes like

INSERT INTO `ps_product_check`(`id_product`, `name`, `catalog`)     
VALUES  (30767,`CT39-235126`,'79926330')

I get the same error.

Post Status

Asked in February 2016
Viewed 3,289 times
Voted 4
Answered 1 times

Search




Leave an answer