The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Query to get posts per board?
What would be the query to get the results of member posts per board?
ie. with seven boards... member name id1 id2 id3 id4 id5 id6 id7 member1 12 18 14 16 23 97 1004 member2 13 12 19 26 28 1207 404 etc. |
#2
|
||||
|
||||
When you say "board" do you mean separate installations of vb each with its own database (I assume all running on the same server) or a board on which you allow multiple logins per member?
|
#3
|
|||
|
|||
Quote:
One installation of vB, multiple forums (sorry I said boards). No multiple logins per member. We are a sports community and want to have a poll. But to vote in the poll, members must have over 100 posts on forums where the forum id is in (2,5,10,12,15). Thanks! |
#4
|
||||
|
||||
Quote:
SELECT count(*) as 'total' FROM post p join thread t USING(threadid) where forumid in (2,5,10,12,15) and userid=whatever or SELECT count(*) as 'total' FROM post p join thread t USING(threadid) where forumid in (2,5,10,12,15) and username=whatever |
#5
|
|||
|
|||
Quote:
THANKS!!!!!! |
#6
|
||||
|
||||
SELECT userid, username, count(*) as 'total' FROM post p join thread t USING(threadid) where forumid in (2,5,10,12,15) group by userid order by total desc
|
#7
|
|||
|
|||
Thank you!
|
#8
|
||||
|
||||
Quote:
[sql]SELECT userid, username, count(*) AS total FROM post p JOIN thread t USING(threadid) WHERE forumid IN (2,5,10,12,15) GROUP BY userid ORDER BY total DESC[/sql] |
#9
|
||||
|
||||
Thought of something else that might help
[sql]SELECT userid, username, count(*) AS total FROM post p JOIN thread t USING(threadid) WHERE forumid IN (2,5,10,12,15) GROUP BY userid HAVING total >= 100 ORDER BY total DESC[/sql] |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|