织梦会员中心收藏夹文章无法删除的解决方法

打开 /member/archives_do.php 文件
找到
/*-----------------
function delStow()
删除收藏
------------------*/
if($dopost=="delStow")
{
    CheckRank(0,0);
    $type=empty($type)? 'sys' : trim($type);
    $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "mystow.php" : $_COOKIE['ENV_GOBACK_URL'];
    $dsql->ExecuteNoneQuery("DELETE FROM mubanpu_member_stow WHERE aid='$aid' AND mid='".$cfg_ml->M_ID."' AND type='$type';");
    //更新用户统计
    $row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `mubanpu_member_stow` WHERE `mid`='".$cfg_ml->M_ID."' ");
    $dsql->ExecuteNoneQuery("UPDATE mubanpu_member_tj SET `stow`='$row[nums]' WHERE `mid`='".$cfg_ml->M_ID."'");
       
    ShowMsg("成功删除一条收藏记录!",$ENV_GOBACK_URL);
    exit();
}

在以上代码中找到
$dsql->ExecuteNoneQuery("DELETE FROM dede_member_stow WHERE aid='$aid ' AND mid='".$cfg_ml->M_ID."' AND type='$type';");
修改为
$dsql->ExecuteNoneQuery("DELETE FROM dede_member_stow WHERE aid='$aid ';"); 
支付宝扫码打赏 微信扫码打赏

如果本文对你有帮助,欢迎打赏本站

喜欢 ()or分享
    匿名评论
  • 评论
人参与,条评论