Home  >  Article  >  Backend Development  >  彭和平垃圾回收机制,该怎么处理

彭和平垃圾回收机制,该怎么处理

WBOY
WBOYOriginal
2016-06-13 11:42:11827browse

彭和平垃圾回收机制
有一个功能:
删除某些内容后,能够恢复原有的内容。这是什么原理?
是不是可以把你想删除的东西存放到另一个表里面。
然后如果你想恢复的话从另一个表里面把它在更新下?

$sql="delete from `#@__skupdate_class` where id=".$id."";
$bool = $dsql->ExecuteNoneQuery($sql);
if(!$bool)
{
ShowMsg("课程信息回收站删除失败",'-1');
exit();
}else{
ShowMsg("课程信息回收站删除成功",'update_class.php?dopost=recycling&page='.$page.'');
exit();
}

$sql="Update `#@__skupdate_class` set state=1 where id=".$id."";
$bool = $dsql->ExecuteNoneQuery($sql);
if(!$bool)
{
ShowMsg("课程信息恢复失败",'-1');
exit();
}else{
ShowMsg("课程信息恢复成功",'update_class.php?dopost=recycling&page='.$page.'');
exit();
}

这是几个意思明明已经删除了啊?
delete from `#@__skupdate_class` where id=".$id."

求解

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn