![]() |
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?
|
[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. |
Thanks... What's the datastore? Also, not sure what you mean by unserializing and the array-key... my PHP isn't that great.
|
Assuming that a connection has already been established (as $connection) and the correct database was selected:
PHP Code:
|
All times are GMT. The time now is 05:06 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|