[英]How to update MySQL text column with concat with a prepared statement?
I am trying to concatenate a text column with UPDATE
in my database but I am unable to find any resouces online that explain how to do with a prepared statement.我正在尝试在我的数据库中将文本列与UPDATE
连接起来,但我无法在网上找到任何解释如何处理准备好的语句的资源。 I keep getting an error:我不断收到错误消息:
syntax to use near '(admin_notes=?) WHERE id=?'在 '(admin_notes=?) WHERE id=?' 附近使用的语法at line 1在第 1 行
UPDATE problem_report SET concat(admin_notes=?) WHERE id=?
You are trying to UPDATE the admin_notes column.您正在尝试更新 admin_notes 列。 You need to concat the value not the column itself.您需要连接值而不是列本身。
UPDATE problem_report SET admin_notes = concat(admin_notes,?) WHERE id=?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.