0
好,我想在phpMyAdmin使用if语句在phpMyAdmin
update dle_post set full_story =concat(full_story ,"[H1]My List[/H1]
[RL1]") where category="283"
执行此查询,但需要添加一些东西一样 如果“)”在full_story或short_story那么这将执行 感谢
好,我想在phpMyAdmin使用if语句在phpMyAdmin
update dle_post set full_story =concat(full_story ,"[H1]My List[/H1]
[RL1]") where category="283"
执行此查询,但需要添加一些东西一样 如果“)”在full_story或short_story那么这将执行 感谢
添加这个条件 -
...
WHERE
category="283"
AND (LOCATE(')', full_story) > 0 OR LOCATE(')', short_story) > 0)
LIKE
这个?
UPDATE dle_post
SET full_story = CONCAT(full_story ,"[H1]My List[/H1] [RL1]")
WHERE category = "283" AND
(full_story LIKE '%)%' OR short_story LIKE '%)%')
或short_story? – Ben
#1064 - 您的SQL语法错误;检查与您的MySQL服务器版本相对应的手册,以便在第4行的'short_story LIKE'%)%')'中使用正确的语法 – user934820
看起来像是从原始问题中剪切并粘贴的...已更正。 –