![]() |
Change Thread ID
I am posting this question here as well. (for faster responses if possible)
How can i change id of a thread, some important threads on one of our forums got deleted accidentally we need to restore them back to there original IDs to preserve our search engine rankings and page ranks. I am sure this requires database alterations, I am ready for same.. Thank You. |
I can not really advice changing any id's in the database, as a lot of information is linked across tables using the id's.
But you could try the following (backup first!!!!!): [sql]UPDATE thread SET threadid = <newthreadid> WHERE threadid = <currentid>;[/sql] [sql]UPDATE post SET threadid = <newthreadid> WHERE threadid = <currentid>;[/sql] Never set to a new threadid that is higher then your current highest id! Also this will break any thread subscriptions etc... PS Backup first!!!!!! Use this at your own risk |
thank you Marco, but sorry for bump I am unable to understand few words in the query.
newthreadid = new thread we have created in our forums ? currentid = old thread which was deleted ? UPDATE post SET threadid = <newthreadid> WHERE threadid = <currentid>; in above query which requires altering post table does newthreadid means new post number ? and currentid means deleted post numbers ? A big thanks for giving me right queries to alter here. Warm Regards, |
newthreadid = new thread we have created in our forums ? <-- No newthreadid is the threadid you want it to have, ie the deleted threadid
currentid = old thread which was deleted ? <-- The currentid is the id of the new thread created. And no, also when updating the post table you should change the threadid, not the postid. |
Thank You once again for your quick confirmations, I will post back the results in a short while.
Warm Regards, |
Thank You Sir Marco van Herwaarden,
this worked like a charm I was able to restore all my deleted threads back again :) |
All times are GMT. The time now is 03:08 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|