现在换成了Crayon Syntax Highlighter:<pre class="brush: php; gutter: true"> //代码区 ...... </pre>
代码高亮的区域不一样,又有很多文章需要改,好吧,mysql肯定有替换功能函数,于是找了一下mysql的replace()函数资料:<pre class="lang_php decode_true"> //代码区 ...... </pre>
replace()函数语法:
实例:update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');
因此一个函数可以replace()函数就十分方便的解决问题了:mysql> SELECT REPLACE('www.yanue.net', 'www', 'map'); +----------------------------------------+ | REPLACE('www.yanue.net', 'www', 'map') | +----------------------------------------+ | map.yanue.net | +----------------------------------------+ 1 row in set (0.00 sec)
文章完.UPDATE wp_posts SET post_content = REPLACE(post_content, '<pre class="brush: php; gutter: true">', '<pre class="lang_php decode_true">');
转载请注明:半叶寒羽
» MySQL之替换字符串函数replace()的使用