Making a dynamic query based on a cookie change
First suggestion is that you shouldn't write the same code twice.  

Your $_GET-if-conditions can be put into a separate function.

$this-&gt;handleCookieByGetParameter('c', 'qanda_questions_category');
$this-&gt;handleCookieByGetParameter('t', 'qanda_questions_tag');

public function handleCookieByGetParameter($parameter, $name)
{
    if ( isset($_GET[$parameter]) ) {
        if ( empty($_GET[$parameter]) ) {
            unset_cookie($name);
        } else {
            set_cookie($name, $_GET[$parameter]);
        }
    }
}


and then I recommend that you check your error before you handle your other stuff:

if ( !$this-&gt;category_cookie &amp;&amp; !$this-&gt;tag_cookie ) {
    return header("Location: /myweb/questions".make_url_query($_GET, [],['c','t']));
    // better an RedirectException
}

$query_where = $query_join = '';

if ( $this-&gt;category_cookie ) {
    $query_where .= "AND qa.category = :c";
    $this-&gt;parameters[":c"] = $_COOKIE['qanda_questions_category'];
}

if ( $this-&gt;tag_cookie ) {
    $query_join  .= " INNER JOIN qanda_tags qt ON qt.qanda_id = qa.id
                  INNER JOIN tags ON tags.id = qt.tag_id";
    $query_where .= " AND tags.name = :t";
    $this-&gt;parameters[":t"] = $_COOKIE['qanda_questions_tag'];
}

return $this-&gt;index($query_where, $query_join, __FUNCTION__);


my next step would be to look to extract the query code into a separate function, so I could use it for other methods too.