![]() |
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? |
Probably something like:
[sql]UPDATE thread SET category='roommate' WHERE forumid=17 AND title LIKE '%roommate%';[/sql] |
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. |
Just run it twice with the other options.
|
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] |
All times are GMT. The time now is 04:59 PM. |
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:
|