Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
916 views
in Q2A Core by
Q2A version: 1.6.2

2 Answers

0 votes
by
selected by
 
Best answer
This flag is state / settings of specific user. See definitions (QA_USER_FLAGS_*) in qa-include/qa-app-users.php
+1 vote
by

I just wonder that over 3 years that I am using q2a non of the flag fields has changed in my setups, all are value 0.

Mostly I find the flags in table qa_users instead.

When checking the source code I found these functions that set/change the flags in qa_uservotes:

    function qa_db_userflag_set($postid, $userid, $flag)
/*    Set the flag for $userid on $postid to $flag (true or false) in the database
*/
    {
        $flag=$flag ? 1 : 0;
        qa_db_query_sub(
            'INSERT INTO ^uservotes (postid, userid, vote, flag) VALUES (#, #, 0, #) ON DUPLICATE KEY UPDATE flag=#',
            $postid, $userid, $flag, $flag
        );
    }
    
    function qa_db_userflags_clear_all($postid)
/*    Clear all flags for $postid in the database
*/
    {
        qa_db_query_sub(
            'UPDATE ^uservotes SET flag=0 WHERE postid=#',
            $postid
        );
    }

It would be great to see a usage example.

...