mysql - 如何编写这样的mysql查询?

标签 mysql

我想编写这种MySQL查询。

select image_path, replace(replace(replace(description,\'/images/\',image_path),\'<![CDATA[\',\'\'),\']]>\',\'\') description from test_image_master where ...

如果我从 php 回显这个查询,它会显示如下

select image_path, replace(replace(replace(description,'/images/',image_path),'','') description from test_image_master where ...

失踪<![CDATA[]]> 。因此查询无法正常工作。

我正在使用 php 和 mysql。

我该如何解决这个问题?

最佳答案

不会错过的。只是浏览器看不到,可以查看html源码。

关于mysql - 如何编写这样的mysql查询?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7750507/

相关文章:

php - 将文本框值传递给复选框值

php - 显示帖子某些订单

php - 从 PHP 将 textarea 元素插入 MySQL

php - 参数号无效 : number of bound variables does not match number of tokens SQL

mysql - 例程 [procedurename] 的存储过程错误 OUT 或 INOUT 参数 1 不是 BEFORE 触发器中的变量或 NEW 伪变量

php - CDbCriteria 只返回一个表数据而不是来自连接的数据

mysql - 为什么 SELECT 结果在 mysql 和 sqlite 之间不同?

MySQL - 从另一个表更新表值

mysql - 使用哪种数据类型来存储分数?

mysql - 左联接 - 未知列错误