The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
![]()
Threads (started by this user):
[sql]SELECT forumid, COUNT( threadid ) AS threads FROM thread WHERE postuserid = 1234 GROUP BY forumid ORDER BY forumid ASC LIMIT 0, 30[/sql] Posts: [sql]SELECT thread.forumid AS forumid, COUNT( post.postid ) AS posts FROM post LEFT JOIN thread ON ( thread.threadid = post.threadid ) WHERE post.userid = 1234 GROUP BY thread.forumid ORDER BY forumid ASC[/sql] Another aproach [sql] SELECT thread.forumid AS forumid, COUNT( post.postid ) AS posts, SUM(IF(thread.postuserid = 1234 AND thread.firstpostid = post.postid, 1, 0) ) AS threads FROM post LEFT JOIN thread ON ( thread.threadid = post.threadid ) WHERE post.userid = 1234 GROUP BY thread.forumid ORDER BY forumid ASC [/sql] This should give you both figures in one query. I've attached a quick'n'dirty ACP script that might do what you want. |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|