mysql - 将文本添加到 phpmyadmin 中的现有单元格

标签 mysql sql text phpmyadmin append

我想将文本添加到 phpmyadmin 中单元格的末尾,它只是将文本添加到该单元格中的任何内容的末尾,并保持原样。

我尝试了这个但不起作用:

update items set description = contact(description, " - text to add") where parent_id ='2907'

所以单元格应该代替

something here

成为:

something here - text to add

最佳答案

您的 SQL 语句中有拼写错误。该函数称为 CONCAT,而不是 contact

试试这个语句。如果不起作用,请将错误消息添加到您的问题中。

update items
  set description = concat(description, " - text to add")
  where parent_id ='2907'

关于mysql - 将文本添加到 phpmyadmin 中的现有单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13193750/

相关文章:

PHP fatal error : Class 'PDO' not found

PHP 和 MySQL 到 Android 的翻译

php - 使用 Active Record 构建查询的优缺点

php - 事件记录和 PHP : the best way to define different associations between two models

javascript - 将 setTimeout 与 Canvas 结合使用以打印数组中的文本

css - 仅在 Firefox 中显示的文本元素,在 safari 或 chrome 中不显示

Python 3 - 从文本文件中逐行读取并为每一行执行操作

mysql - 如何避免 MySQL 'Deadlock found when trying to get lock; try restarting transaction'

mysql - 由于外键约束导致的延迟插入

mysql - 从相似结果中过滤掉每组除一个结果以外的所有结果