织梦通过php文件批量替换数据库数据(2)

    $rs10 = $dsql->ExecuteNoneQuery(" UPDATE `dede_search_keywords` SET `keyword` = REPLACE(`keyword`, '{$vv[0]}', '{$vv[1]}'), `spwords` = REPLACE(`spwords`, '{$vv[0]}', '{$vv[1]}'); ");

    if(!$rs10) echo "替换{$vv[0]}失败<br />";

    else echo "替换{$vv[0]}成功<br />";

    //tagindex

    $rs11 = $dsql->ExecuteNoneQuery(" UPDATE `dede_tagindex` SET `tag` = REPLACE(`tag`, '{$vv[0]}', '{$vv[1]}'); ");

    if(!$rs11) echo "替换{$vv[0]}失败<br />";

else echo "替换{$vv[0]}成功<br />";

    //taglist

    $rs12 = $dsql->ExecuteNoneQuery(" UPDATE `dede_taglist` SET `tag` = REPLACE(`tag`, '{$vv[0]}', '{$vv[1]}'); ");

    if(!$rs12) echo "替换{$vv[0]}失败<br />";

    else echo "替换{$vv[0]}成功<br />";

    //vote

    $rs13 = $dsql->ExecuteNoneQuery(" UPDATE `dede_vote` SET `votename` = REPLACE(`votename`, '{$vv[0]}', '{$vv[1]}'), `votenote` = REPLACE(`votenote`, '{$vv[0]}', '{$vv[1]}'); ");

    if(!$rs13) echo "替换{$vv[0]}失败<br />";

    else echo "替换{$vv[0]}成功<br />";

    //ask

    $rs14 = $dsql->ExecuteNoneQuery(" UPDATE `dede_feedback` SET `feedtitle` = REPLACE(`feedtitle`, '{$vv[0]}', '{$vv[1]}'), `msg` = REPLACE(`msg`, '{$vv[0]}', '{$vv[1]}'); ");

    if(!$rs14) echo "替换{$vv[0]}失败<br />";

    else echo "替换{$vv[0]}成功<br />";

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wsfzss.html