I am trying to add strings with a separator ',' in the UPDATE statement in a column as follows:
const sql="UPDATE Events SET rejectedBy=rejectedBy+? WHERE id=2"
db.query(sql,[request.params.name+','],(err,result)=>{
if(err) throw err;
})
But I am getting error like:
Truncated incorrect DOUBLE value: 'berlin7,'
where berlin7 is the value of request.params.name.
My table column is
rejectedBy varchar(250) NOT NULL DEFAULT ''
How do I solve it?