The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Query to close threads with a prefix?
I'd like to use an SQL query to close all threads in a specific forum that have a specific prefix (prefix=product version). I don't know how to create queries. The best I can come up with is this:
Code:
UPDATE thread SET open = 0 WHERE vb_thread.prefixid = X and vb_forumid=y |
#2
|
|||
|
|||
It's a lot easier than you think:
HTML Code:
UPDATE thread SET open = 0 WHERE prefixid = X AND forumid = X |
#3
|
|||
|
|||
Quote:
Btw, it is possible to change your codes to close all threads with 1 post or they are old posts with 1 post (I mean it has no answer on its thread)? |
#4
|
||||
|
||||
Thanks! I appreciate the response.:up:
|
#5
|
|||
|
|||
Quote:
For example, the following SQL query will close all threads that are older than 1 week and have no replies: HTML Code:
UPDATE thread SET open = 0 WHERE replycount = 0 AND lastpost < UNIX_TIMESTAMP(NOW() - INTERVAL 1 WEEK) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|