gpt4 book ai didi

mysql - 无法处理带有特殊字符的代码

转载 作者:行者123 更新时间:2023-11-29 09:46:15 25 4
gpt4 key购买 nike

UPDATE `ps_product_lang` 
SET
`description` = REPLACE(`description`, '<li><p>', '<li>')

以上代码未处理,并显示 0 Rows affected但是,以下代码适用于受影响的某些行:

UPDATE `ps_product_lang` 
SET
`description` = REPLACE(`description`, 'lip', 'li')

如何处理之前的代码?我想准确替换 <li><p>

最佳答案

你的问题与此类似。你可以看一下:

Update a column value, replacing part of a string

我认为您可能需要在 UPDATE 查询中添加 LIKEWHERE 子句。像这样的事情:更新你的表
设置 url = REPLACE(url, 'http://domain1.com/images/', 'http://domain2.com/otherfolder/')
WHERE url LIKE ('http://domain1.com/images/%');

关于mysql - 无法处理带有特殊字符的代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55603545/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com