把数据库中的表情代码替换成HTML标签

改正文和评论表情


表名根据前缀自行修改

正文替换

UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji2:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji2.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji4:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji4.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji5:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji5.gif\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji6:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji6.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji8:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji8.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji9:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji9.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji11:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji11.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji12:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji12.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji14:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji14.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji15:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji15.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji16:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji16.gif\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji18:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji18.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji19:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji19.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji20:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji20.gif\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji21:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji21.gif\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji22:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji22.png\" style=\"height:32px\" >');
UPDATE `typecho_contents` SET `text` = REPLACE(`text`,':huaji23:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji23.png\" style=\"height:32px\" >');

评论替换

UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji2:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji2.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji4:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji4.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji5:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji5.gif\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji6:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji6.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji8:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji8.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji9:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji9.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji11:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji11.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji12:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji12.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji14:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji14.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji15:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji15.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji16:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji16.gif\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji18:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji18.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji19:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji19.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji20:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji20.gif\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji21:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji21.gif\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji22:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji22.png\" style=\"height:32px\" >');
UPDATE `typecho_comments` SET `text` = REPLACE(`text`,':huaji23:','<img class=\"smilies\" src=\"//cdn.menhood.wang/emotion/huaji/huaji23.png\" style=\"height:32px\" >');

标签: typecho, sql, 表情, 替换, 标签