Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How would you count discussions and comments?
I'm working on an extension but want to build it so that it doesn't cause performance problems. Is there a good way to get the grand total number of discussions and comments? I've looked at the PanelCategories extension and can use that technique to get the counts by category. But what I would like to get is the grand total before I would go into the category loop so that I can analyze the categories.
I would appreciate any advice as to where to look?
Thanks, jim
0
This discussion has been closed.
Comments
Comments count:
SELECT count(*) FROM LUM_Comment WHERE deleted = '0'
Discussions count:
SELECT count(*) FROM LUM_Discussion WHERE CategoryID = 'x'
Replace x with whatever category you want to check in. Remove the where line to check all categories. There was a post a couple months back where Mark described a quick way to run SQL--http://lussumo.com/community/discussion/3240/?Focus=40267#Comment_40267