I’m trying to update my column with that simple query:
UPDATE products SET desc='1' WHERE 1
But i get this error message : A new statement was found but no delimiter between it and the previous one. If I change desc column to another column than the query is working properly.
I saw THERE that this is a bug, I updated my phpmyadmin to the latest version 5.1, but I still get this error message, what could be the problem?
DESC is a reserved word in MySQL used in ordering the results of a query.
Keywords are words that have significance in SQL. Certain keywords, such as SELECT, DELETE, or BIGINT, are reserved and require special treatment for use as identifiers such as table and column names. This may also be true for the names of built-in functions.
Nonreserved keywords are permitted as identifiers without quoting. Reserved words are permitted as identifiers if you quote them as described in Section 9.2, “Schema Object Names”:
As I have highlighted above, you can quote a reserved word if you want to use it as identifier, using
The identifier quote character is the backtick (`)
So you just need to change your query a bit adding the backticks.
UPDATE products SET `desc`='1' WHERE 1;
You can see a little example here.