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

I am displaying x % answered on my forum. However, the qa_opt('cache_qcount') includes also closed questions that will never be answered. The statistics is not correct.

Is it save to change in qa-db-admin.php the function qa_db_count_posts from:

$wheresql.=(strlen($wheresql) ? ' AND' : ' WHERE').' userid '.($fromuser ? 'IS NOT' : 'IS').' NULL';

to:

$wheresql.=(strlen($wheresql) ? ' AND' : ' WHERE').' userid '.($fromuser ? 'IS NOT' : 'IS').' NULL';
if($type=='Q') {
  $wheresql.=' AND closedbyid IS NULL';
}

It seems to work...

Q2A version: 1.6.2

Please log in or register to answer this question.

...