The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
sql query recursive exclude forums
Hi guys,
i'm trying to catch some information out of our board, but want to exclude specific categories, their subforums and the subforums of those subforums. Is there an easy way to use a vb-function which allready does this in my custom sql query? Help is greatly appreciated. |
#2
|
||||
|
||||
Code:
... WHERE forumid NOT IN 1,2,3,4,5,... |
#3
|
|||
|
|||
I know how to write it by hand. But that's not want i want. It has to be automated since we will add a lot of boards in those categories over the time (and it does affect more than 50 subforums as of right now - i didn't count).
So i'm looking for a vb-function which allready does what i want. There should be something in the search? Where one can search through a whole category. |
#4
|
|||
|
|||
The 'childlist' column of the forum table is a comma-separated list of all the children (and the children's children, etc) of a forum (The list includes the forum itself and -1, for some reason - maybe to mark the end of the list?). If you have the forum info (or the forum cache is filled in so you can get the info) you should be able to do something like "WHERE forumid NOT IN $forum['childlist']". (Or I suppose you could just use the field name if your query includes the forum table).
|
Благодарность от: | ||
Mooff |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|