ye22
03-03-2010, 02:12 PM
How can i delete duplicate posts .... ?
I did this ...
SELECT bad_rows. * FROM post AS bad_rows
INNER JOIN (
SELECT threadid, dateline, username, userid, MIN( postid ) AS min_postid FROM post
GROUP BY threadid, dateline, userid
HAVING count( * ) >1
) AS good_rows ON good_rows.threadid = bad_rows.threadid
AND good_rows.dateline = bad_rows.dateline
AND good_rows.userid = bad_rows.userid
AND good_rows.min_postid <> bad_rows.postid
Showing rows 0 - 29 (291,867 total, Query took 282.2048 sec)
https://vborg.vbsupport.ru/external/2010/03/94.jpg
When i delete ....
Error
SQL query:
DELETE FROM `xxx_aaa`.`post` WHERE `bad_rows`.`postid` =384
MySQL said:
#1054 - Unknown column 'bad_rows.postid' in 'where clause'
https://vborg.vbsupport.ru/external/2010/03/95.jpg
http://www.vbulletin.com/forum/showthread.php?343419-Duplicate-post-...!!!
I did this ...
SELECT bad_rows. * FROM post AS bad_rows
INNER JOIN (
SELECT threadid, dateline, username, userid, MIN( postid ) AS min_postid FROM post
GROUP BY threadid, dateline, userid
HAVING count( * ) >1
) AS good_rows ON good_rows.threadid = bad_rows.threadid
AND good_rows.dateline = bad_rows.dateline
AND good_rows.userid = bad_rows.userid
AND good_rows.min_postid <> bad_rows.postid
Showing rows 0 - 29 (291,867 total, Query took 282.2048 sec)
https://vborg.vbsupport.ru/external/2010/03/94.jpg
When i delete ....
Error
SQL query:
DELETE FROM `xxx_aaa`.`post` WHERE `bad_rows`.`postid` =384
MySQL said:
#1054 - Unknown column 'bad_rows.postid' in 'where clause'
https://vborg.vbsupport.ru/external/2010/03/95.jpg
http://www.vbulletin.com/forum/showthread.php?343419-Duplicate-post-...!!!