function getCountQuery($filteredTerm, $fulltext) { $match = $this->parseQuery($filteredTerm, $fulltext); $page = $this->db->tableName('page'); $searchindex = $this->db->tableName('searchindex'); return "SELECT COUNT(*) AS c " . "FROM {$page},{$searchindex} " . "WHERE page_id={$searchindex}.rowid AND {$match}" . $this->queryRedirect() . ' ' . $this->queryNamespaces(); }