Quote:
Originally Posted by Farcaster
If I understand your goal correctly and you want to update EVERY post in your database to have the same title as the parent thread, then I believe this code will work for you:
[SQL]UPDATE post, thread
SET post.title = thread.title
WHERE post.threadid = thread.threadid
AND post.title <> thread.title[/SQL]
Try it on your test forum first to make sure it works as you expected.
|
Farcaster:
I tried it first with a single thread and then an entire forum. It worked perfectly in both instances and was very fast. However, running it against the entire vb database brought the system to a virtual crawl (we have 1.2 million posts). Since limiting it to a forum was quick, I'm going to batch it up that way in the future.
I really banged my head against the wall on this matter for about 10 hours until I read your reply.
Thank you so very much! -- Rik
--------------- Added [DATE]1232525499[/DATE] at [TIME]1232525499[/TIME] ---------------
Further to my post above....
I was able to bring into sync all thread titles and their corresponding post titles. I had accumulated over 100,000 mis-matches in 4-5 years. I had to do it forum-by-forum as mentioned above in order to limit the demands on the server. But now that its done, I can run the query against all forums quickly -- as long as I keep everything fairly up-to-date (perhaps via cron).
Thanks again, Farcaster. It should help our Google ranking. -- Rik