The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Standalone Queries to Output # Members, Posts, Threads
I'm looking to output the number of members, posts and threads on a non-vB page. What would the appropriate queries be to catch these results?
|
#2
|
||||
|
||||
[sql]SELECT SUM(replycount) AS posts, SUM(threadcount) AS threads FROM forum WHERE displayorder != 0 AND (options & 1)[/sql]
[sql]SELECT COUNT(*) AS members FROM user[/sql] You can also use the datastore: [sql]SELECT data FROM datastore WHERE title = 'userstats'[/sql] Unserialize this and use the array-key numbermembers. |
#3
|
|||
|
|||
Thanks... What's the datastore? Also, not sure what you mean by unserializing and the array-key... my PHP isn't that great.
|
#4
|
||||
|
||||
Assuming that a connection has already been established (as $connection) and the correct database was selected:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|