The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Query Help With A Mod
I have that prefix category hack installed for 3.0.7 and it works great. I imported recently from Ubb.Classic. I want to assign a category to all my threads in a forum that have "roommate" in the thread title.
I need a query to do this else I have to edit 17 pages worth of threads. I know a few things to get started. The table to be updated is 'thread' and I would be updating the 'title' , and 'category' fields. Id like to know how to select all threads in forumid 17, with "roommate" in their title. THen I need to update all those threads and set the category = "roommate" Any ideeas? or does that make sense? |
#2
|
|||
|
|||
Probably something like:
[sql]UPDATE thread SET category='roommate' WHERE forumid=17 AND title LIKE '%roommate%';[/sql] |
#3
|
||||
|
||||
ok now I havnt tried it yet, but the select statement worked with what u said.
Before I try that, how can I alter that statement to include like '%roommate%', '%roomate%', etc. Just difference variations of it, in case some titles are mispelled. |
#4
|
|||
|
|||
Just run it twice with the other options.
|
#5
|
||||
|
||||
Someone please correct me if this is wrong as I`ve had a few to drink ... But this is another way of doing it in one. Just add as many variations as you need.
[sql] UPDATE thread SET category='roommate' WHERE forumid=17 AND title IN (SELECT category FROM thread WHERE title like %roommate% OR %roomate% OR %rommate%) [/sql] |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|