Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 29 Jan 2018, 15:29
kgroneman's Avatar
kgroneman kgroneman is offline
 
Join Date: Aug 2007
SQL query to assign threads a prefix

I'm needing to assign all threads in a specific forum that do not currently have a prefix to an existing prefix. Is there some kind soul out there that could show me an SQL query that would do such a thing? I sure would appreciate it. Thanks in advance.
Reply With Quote
  #2  
Old 06 Feb 2018, 10:17
Inna Inna is offline
 
Join Date: Jul 2016
First, in "prefix" table of vBulletin find your desired "prefixid" (it could be an alphabetic name or numerical one). In my case, it's id is "test".
Now run this query in "thread" table:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Where forumid is the id of your desired forum.
Before running any query, please make a backup of your thread table.
Reply With Quote
  #3  
Old 06 Feb 2018, 14:56
kgroneman's Avatar
kgroneman kgroneman is offline
 
Join Date: Aug 2007
Thanks! much appreciated. This looks like it may set ALL threads to that prefix instead of just threads without a prefix, but what do I know. :-) I'll test it out before using it in a critical forum and report back.

--------------- Added 06 Feb 2018 at 15:28 ---------------

This worked with a slight modification to achive my desired results:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

All good now. Thanks.
Reply With Quote
  #4  
Old 06 Feb 2018, 15:30
Inna Inna is offline
 
Join Date: Jul 2016
You can use AND query

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

--------------- Added 06 Feb 2018 at 15:45 ---------------

My appreciation my friend
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forum Display Enhancements Auto assign / Default thread prefix when posting a new thread JamesGunner vBulletin 4.x Add-ons 27 23 Jan 2016 19:57



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 16:32.

Layout Options | Width: Wide Color: