亚洲女人被黑人巨大进入-亚洲日本视频在线观看-亚洲AV秘片一区二区三3-亚洲欧美中文字幕乱码在线

<dfn id="uqq4w"><dl id="uqq4w"></dl></dfn>
  • <abbr id="uqq4w"></abbr>
    <center id="uqq4w"><cite id="uqq4w"></cite></center>
    ?
    徐州北大青鳥(niǎo)

    批量去除MySQL數(shù)據(jù)庫(kù)中文章內(nèi)容的超鏈接

    時(shí)間:2011-04-23 11:06來(lái)源:中博IT教育 作者:代碼如詩(shī) 點(diǎn)擊:
    此方法是在保留文章內(nèi)容的情況下去除超鏈接,適用于信息采集時(shí)入庫(kù)有別人的鏈接,自己寫(xiě)著玩的,高手莫見(jiàn)笑 先刪除文章內(nèi)容中超鏈接的前半部分: update articleset article_info.conten

    此方法是在保留文章內(nèi)容的情況下去除超鏈接,適用于信息采集時(shí)入庫(kù)有別人的鏈接,自己寫(xiě)著玩的,高手莫見(jiàn)笑

    先刪除文章內(nèi)容中超鏈接的前半部分:

    update articleset article_info.content =
    replace(article.content,
    substring(article.content,
    locate('<a ', article.content),
    locate('>', article.content,locate('<a ', article.content))+1-locate('<a ', article.content)
    ),
    '');

    上部代碼執(zhí)行一次能夠刪除文章內(nèi)容中的第一個(gè)超鏈接,多執(zhí)行幾次指導(dǎo)影響行數(shù)為0為止

     

    下面就是刪除文章內(nèi)容中超鏈接的后半部分:

    update article_info set article_info.content =
    replace(article_info.content,'</a>','');

    試聽(tīng)課
    (責(zé)任編輯:代碼如詩(shī))
    ------分隔線(xiàn)----------------------------
    欄目列表
    推薦內(nèi)容