1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-03 18:04:08 +02:00

add materialized view for map list

This commit is contained in:
Robin Appelman 2017-09-12 17:44:06 +02:00
commit 060346deba

View file

@ -6,7 +6,7 @@ namespace Demostf\API\Providers;
class InfoProvider extends BaseProvider {
public function listMaps() {
$sql = 'SELECT DISTINCT(map), COUNT(map) AS count from demos GROUP BY map ORDER BY count DESC';
$sql = 'SELECT map, count FROM map_list';
$result = $this->query($sql);
return $result->fetchAll(\PDO::FETCH_COLUMN);