Reputation: 2295
I messed up one of the columns of my database while url encoding the input. Now all the spaces are replced by a "+" sign.
I tried updating the DB using the following query but it throws me error
UPDATE tableName SET 'columnName' = REPLACE('columnName','+',' ')";
Error i am getting is :
Unknown column 'columnName' in 'field list'
Upvotes: 0
Views: 24
Reputation: 5077
Do not use quote mark for column name, Try this
UPDATE tableName SET columnName = REPLACE(columnName,'+',' ');
Upvotes: 1
Reputation: 22711
Try this, Remove single quote wrapped around the column name
UPDATE tableName SET `columnName` = REPLACE(`columnName`,'+',' ')";
Upvotes: 1