The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Could anyone please help me with an SQL query?
I would like to run an SQL query to get a list of how many threads each user has created in a specific forum ID. Output would show: User1: 24 threads User2: 50 threads User3: 23 threads etc etc Thank you. |
|
#2
|
||||
|
||||
|
Quote:
Code:
SELECT username, count(*) AS threads FROM user LEFT JOIN thread ON (user.userid = thread.postuserid) WHERE thread.forumid = 2 GROUP BY username If you were doing the query in php it would be as follows: PHP Code:
|
| Благодарность от: | ||
| tbworld | ||
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|