03-03-2010, 02:12 PM
|
|
|
Join Date: Dec 2002
Location: cairo
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Duplicate post ...!
How can i delete duplicate posts .... ?
Quote:
Originally Posted by ye22
I did this ...
Code:
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)
When i delete ....
Code:
Error
SQL query:
DELETE FROM `xxx_aaa`.`post` WHERE `bad_rows`.`postid` =384
MySQL said:
#1054 - Unknown column 'bad_rows.postid' in 'where clause'
|
http://www.vbulletin.com/forum/showt...uplicate-post-...!!!
|