Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
702 views
in Q2A Core by
hello, i am trying to modify random  question viewer plugin. But in that plug shows all question. i want to show unanswered random question. there is a query.

 function output_widget() {
        $random_question = qa_db_read_one_assoc(
            qa_db_query_sub('SELECT * FROM ^posts WHERE  type=$
            ORDER BY rand()
            LIMIT 1',
            'Q'),
                true );

how i can find unanswered question from mysql?

thank you.
Q2A version: 1,8
by
Yeah I also want this
by
What's the repository link?
by
https://github.com/bluegenel/q2a-random-question
q2a-random-question.php line start from 42

1 Answer

+2 votes
by
selected by
 
Best answer
Just replace this line:

qa_db_query_sub('SELECT * FROM ^posts WHERE  type=$

With this line:

qa_db_query_sub('SELECT * FROM ^posts WHERE  type=$ AND acount = 0
by
yeah. it is working. thank you @pupi1985
...