vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Change Thread ID (https://vborg.vbsupport.ru/showthread.php?t=142961)

SaN-DeeP 03-23-2007 09:21 PM

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.

Marco van Herwaarden 03-24-2007 08:18 AM

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

SaN-DeeP 03-24-2007 06:52 PM

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,

Marco van Herwaarden 03-24-2007 07:08 PM

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.

SaN-DeeP 03-24-2007 07:20 PM

Thank You once again for your quick confirmations, I will post back the results in a short while.

Warm Regards,

SaN-DeeP 03-28-2007 02:16 AM

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
  • Page Generation 0.03765 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete