Quote:
If you want to update deldate from moderator log (if available), these two querries could help:
UPDATE deletionlog, moderatorlog SET deletionlog.deldate=moderatorlog.dateline
WHERE deletionlog.type = 'post' AND deletionlog.deldate=0 AND (moderatorlog.postid = deletionlog.primaryid) AND moderatorlog.action LIKE 'post %deleted%';
UPDATE deletionlog, moderatorlog SET deletionlog.deldate=moderatorlog.dateline
WHERE deletionlog.type = 'thread' AND deletionlog.deldate=0 AND (moderatorlog.threadid = deletionlog.primaryid) AND moderatorlog.action LIKE 'thread %deleted%';
|
These are ONE TIME query, to get dateline information from moderatorlog and put into deldate in deletion log.
Assume that you have whole bunch of posts/threads deleted, and you just add a new field deldate (actually you should name it dateline for vB consistancy). the deldate value for all deleted posts/threads are ZERO.
However, when a moderator/admin delete a post/thread, the action will be record into moderator log (with dateline, and action = Post/Thread XXX Deleted)
The timeline in moderator log IS the time when the mod/admin delete a thread. I can just copy this value and put into deletionlog (if the deldate indeletionlog is missing (=0)
Quote:
Sort ASC by deldate:
Look for (2 places
LIMIT " . (($page - 1) * $perpage) . ", $perpage
Add after:
ORDER BY `deldate` ASC
|
I want to sort the list by deldate, so that all the oldest deleted post are displayed first => I can take a look and hard-delete them first