The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
SQL Query to get view counts of Thread
Hey All,
I'm looking to get the view counts of threads Code:
select threadid, count(*) as count from threadviews where threadid = 104216 group by threadid order by count desc Code:
104216 2 So I'm not sure where to get the correct view count. Thanks in advance, Carlos |
#2
|
|||
|
|||
Well, you could just get the "views" column from the thread table:
Code:
SELECT views FROM thread WHERE threadid=104216 But if you have the "Update Thread Views Immediately" setting set to No, then that count won't contain the views within the last hour. They're collected up in the threadviews table, then once an hour they're counted and added to the value in the thread table. So that query you have is just counting the views since the last time the Thread Views scheduled task ran. |
#3
|
|||
|
|||
Thanks kh99!
I completely missed that column in thread |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|