The Arcive of vBulletin Modifications Site. |
|
Top Thread Starter Details »»
|
|||||||||||||||||||||||||
Can someone please help me with a query that will pull the Top thread starter from a forum and the average threads that user has started in that forum? This is the only query I have left to do.
![]() Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
[SQL]SELECT COUNT(*) as threads, postusername
FROM thread WHERE forumid=xx GROUP BY postuserid ORDER BY threads DESC[/SQL] |
|
#3
|
||||
|
||||
|
Thank you sir.
How would I get the user's average percent compared to the total threads in that forum?Edit: I figured the percentage part out. Thank you, again, sir. ![]() How would I include the Announcements in the thread count? I have the Announcements as a thread hack (I think it is yours). |
|
#4
|
||||
|
||||
|
announcements are in a different table, so it's not possible with one query.
they show up as multiple threads but they aren't real threads, therfore you have to run another query to get the announcements ![]() (at least i think union queries aren't possible with mysql?) |
|
#5
|
||||
|
||||
|
Ok, but can I still somehow include the announcements thread in the total threads and top thread poster stats?
|
|
#6
|
|||
|
|||
|
Investigating.
(and /me smacks Stefan for using * in a query )
|
|
#7
|
|||
|
|||
|
Still investigating after I made a bad JOIN that made MySQL completely lock up my computer
|
|
#8
|
|||
|
|||
|
Okay, I have no idea. However MySQL 4.0.0+ supports UNION syntax, Stefan.
|
|
#9
|
||||
|
||||
|
yes, 4.0.0+ i thought of, but i don't think 3.x versions support em.
*? hey i'm just lazy
|
|
#10
|
||||
|
||||
|
Quote:
|
![]() |
|
|