Peng Heping's garbage collection mechanism has a function:
After deleting some content, you can restore the original content. What is the principle?
Can you store the items you want to delete in another table.
Then, if you want to restore it, update it from another table?
$ SQL = "delete from '#@__ skupdate_class' where id =". $ id. ""; $ bool = $ dsql-> ExecuteNoneQuery ($ SQL); if (! $ Bool) {ShowMsg ("failed to delete course information recycle bin", '-1'); exit () ;}else {ShowMsg ("course information recycle bin deleted successfully ", '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 ("course information recovery failed", '-1'); exit ();} else {ShowMsg ("course information recovery successful", 'update _ class. php? Dopost = recycling & page = '. $ page. ''); exit ();}
Which of the following statements have already been deleted?
delete from `#@__skupdate_class` where id=".$id."
Solution
Reply to discussion (solution)
It seems clear. I have not written any code here !!
$ SQL = "update' # skupdate_class 'set state = 2 where id = ". $ id. ""; $ bool = $ dsql-> ExecuteNoneQuery ($ SQL); if (! $ Bool) {ShowMsg ("failed to delete course information", '-1'); exit ();} else {ShowMsg ("course information deleted successfully", 'update _ class. php? Page = '. $ page. ''); exit ();}
It is actually updated to another place. Then, restore it back based on the state .. Done. It's not a waste of time .... I will see it later and send it again!
Data table definition status field 0 indicates deletion, 1 indicates activation
When you add data, the status is 1 and when you delete the data, the status is 0.
Recover Data and directly change the status attribute.
Data table definition status field 0 indicates deletion, 1 indicates activation
When you add data, the status is 1 and when you delete the data, the status is 0.
Recover Data and directly change the status attribute.
Well. I'm missing your profile picture ..
Haha