So there is no other way to delete more than 200 posts in one go?
I need to delete 90724 posts having phrase news.google.com in them (they are leading thread posts, and some of these threads have replies)
Now the posts are made by one user but he no longer exist as he has a Guest status and message "Invalid User specified." appears.
I have another theory on how to solve this:
Quote:
create new user, copy its userid and then run mysql query which will find all posts that i want to delete (contains certain phrasse) and then modify these mysql entries userid's to match new user userid, and then delete this user via admincp.
|
In MySQL db i see:
SELECT * FROM `post` WHERE `pagetext` LIKE '%news.google.com%'
i found 2 users which have matching posts:
username: username1, username2
userid: 479, 0
pagetext: %news.google.com%
username2 had userid 308
SELECT * FROM `thread` WHERE `postusername` LIKE 'username1' AND `postuserid` LIKE '308' AND `replycount` LIKE '0' AND `notes` LIKE 'Imported thread'
This found posts i want to delete.
UPDATE `thread` SET `postuserid` = '308' WHERE `postusername` LIKE 'username2' AND `postuserid` LIKE '308' AND `replycount` LIKE '0' AND `notes` LIKE 'Imported thread'
is wrong
Please any idea on right mysql query?
I found:
UPDATE table1 dest, (SELECT * FROM table2 where id=x) src
SET dest.col1 = src.col1 where dest.id=x ;
but does not work