<?php
 class vB_dB_Query_Summary extends vB_dB_Query_Select { public function setQuery(array $params, array|string $sortorder) : bool { if ($params[self::TYPE_KEY] == self::QUERY_COUNT) { $params[self::COLUMNS_KEY] = ['COUNT(*)']; } return parent::setQuery($params, $sortorder); } protected function buildQuery(array $values) : string { $queryBuilder = self::$queryBuilders[$this->db_type]; $params = $this->extractParamsFromValues($values); $where = $this->getWhere($queryBuilder, $values); return $queryBuilder->makeSummaryQuery($this->queryid, $where, $this->structure['structure'], $params); } } 