The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Deleting Duplicate Threads That Do NOT Share The Same Timestamp
I need to delete some duplicate threads, but they do not have the same time stamp.
I opened up admincp/misc.php and went to: Code:
$threads = $db->query_read(" SELECT threadid, title, forumid, postusername, dateline FROM " . TABLE_PREFIX . "thread WHERE threadid >= " . $vbulletin->GPC['startat'] . " ORDER BY threadid LIMIT " . $vbulletin->GPC['perpage'] ); $finishat = $vbulletin->GPC['startat']; while ($thread = $db->fetch_array($threads)) { $deletethreads = $db->query_read(" SELECT * FROM " . TABLE_PREFIX . "thread WHERE title = '" . $db->escape_string($thread['title']) . "' AND forumid = $thread[forumid] AND postusername = '" . $db->escape_string($thread['postusername']) . "' AND dateline = $thread[dateline] AND threadid > $thread[threadid] "); and changed it to (I removed what was colored blue above) : Code:
$threads = $db->query_read(" SELECT threadid, title, forumid, postusername FROM " . TABLE_PREFIX . "thread WHERE threadid >= " . $vbulletin->GPC['startat'] . " ORDER BY threadid LIMIT " . $vbulletin->GPC['perpage'] ); $finishat = $vbulletin->GPC['startat']; while ($thread = $db->fetch_array($threads)) { $deletethreads = $db->query_read(" SELECT * FROM " . TABLE_PREFIX . "thread WHERE title = '" . $db->escape_string($thread['title']) . "' AND forumid = $thread[forumid] AND postusername = '" . $db->escape_string($thread['postusername']) . "' AND threadid > $thread[threadid] "); This gets rid of the time stamp requirement, but now, I need to limit it to a specific username/id. How do I do this? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|