Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
905 views
in Q2A Core by

I still gather stuff for a statistics plugin.

Now I would like to know: What is the fastest way to get number of unanswered questions?

Additionally, what mysql query do I need to identify them?

Thanks,
Kai

 

PS: This is a bit related to How to get number of Unanswered questions (admin)?

1 Answer

+2 votes
by
selected by
 
Best answer

qa_opt('cache_unaqcount')

by
wonderful! =)
by
Reminded me of the hack not to count closed questions:

// 1.5.4 is:
qa_db_query_sub("REPLACE ^options (title, content) SELECT 'cache_unaqcount', COUNT(*) FROM ^posts WHERE type='Q' AND acount=0");

// changed: do not count closed questions
qa_db_query_sub("REPLACE ^options (title, content) SELECT 'cache_unaqcount', COUNT(*) FROM ^posts WHERE type='Q' AND acount=0 AND closedbyid IS NULL");

Maybe we can add this option to 1.6?

In memory of:
http://www.question2answer.org/qa/15799/
http://www.question2answer.org/qa/17983/
http://www.question2answer.org/qa/16094/
by
Please put all suggestions for 1.6 in the main thread, so I can keep track of them: http://www.question2answer.org/qa/19647/question2answer-1-6-roadmap
by
will do so, thanks
...