【问题标题】:MySql concat and quotesMySql 连接和引号
【发布时间】:2013-02-23 19:59:39
【问题描述】:

我正在尝试做这样的事情:

<td>style="background:url('myimage.jpg') no-repeat;"> + column + </td>

但我在尝试时遇到 MySQL 错误:

Concat ('<td>style="background:url('myimage.jpg') no-repeat;">', info_text, '</td') as Nicetext

我想是所有的引用都搞砸了。

感谢大家的帮助!

【问题讨论】:

标签: mysql concat


【解决方案1】:

您的字符串包含引号。你将不得不逃离他们。尝试类似:

Concat ('<td>style="background:url(\'myimage.jpg\') no-repeat;">', info_text, '</td') as Nicetext

【讨论】:

    【解决方案2】:

    您没有转义引号。试试这个:

    Concat ('<td>style="background:url(\'myimage.jpg\') no-repeat;">', info_text, '</td') as Nicetext
    

    【讨论】:

      猜你喜欢
      • 2012-10-13
      • 2016-10-08
      • 1970-01-01
      • 2023-04-05
      • 1970-01-01
      • 1970-01-01
      • 2011-06-13
      • 2018-01-29
      • 1970-01-01
      相关资源
      最近更新 更多