Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
718 views
in Plugins by
edited by
I want to develop new plug-in which will report the statistic of q2a page.
I can't find the field that save status of an answer.

What field or table in database specify that an answer was selected or not?

Please help,
Quan
Q2A version: 1.7

1 Answer

+1 vote
by
selected by
 
Best answer

This might help.

As you can see the ^posts table contains a selchildid field. It is nullable foreign key that references the very same table. So, for a given question, when that field is null then the question has no selected answer. When it is assigned a value different than null then the question has a best answer selected. The value, in this case, would be the id of the answer that was selected as best.

by
Thanks you for your help.
...