Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
in Q2A Core by
How can I access all closed questions?

Thank you for your answer.
Q2A version: 1.8

1 Answer

+2 votes
selected by
Best answer

I recently noticed there is a bug related to what a close question is.

A closed question should be either:

  1. A question that has been explicitly closed
  2. If the Close questions with a selected answer setting is enabled, a question that has a selected answer

In some parts of the core, a closed question is taking into account both conditions but in general only the first one is taken into account.

So, if you have have not enabled the Close questions with a selected answer setting, then just run this query:

SELECT * FROM `qa_posts`
WHERE `type` LIKE 'Q%' AND `closedbyid` IS NOT NULL

If you have enabled that setting then run this query:

SELECT * FROM `qa_posts`
WHERE `type` LIKE 'Q%' AND (`closedbyid` IS NOT NULL OR `selchildid` IS NOT NULL)

In both cases, if you want to get just a column with the URL, rather than just all the raw data, you can do something like this (then add the appropriate WHERE conditions based on the previous SQL statements):

        (SELECT `content` FROM `qa_options`WHERE `title` = 'site_url' ),
    ) `url`,
FROM `qa_posts`

I think he meant for a non admin user. Like on this site for example.
you are absolutely right.
I want everyone to have access.
That might require a custom plugin (or maybe a feature request for next Q2A version?). Why do you need that?
I close the questions I see incorrectly on my site. I edit those questions then when I'm available. I can do my job faster if I can access all the closed questions.
I see. So it is not really needed for the average user of your site to actually access that. As long as you have the links to view them later that's it.