diff --git a/src/Database/Query/SelectQuery.php b/src/Database/Query/SelectQuery.php index 6a9bf6a670f..07f3226b7f0 100644 --- a/src/Database/Query/SelectQuery.php +++ b/src/Database/Query/SelectQuery.php @@ -146,7 +146,7 @@ public function all(): iterable * $query->select('id', true); // Resets the list: SELECT id * $query->select(['total' => $countQuery]); // SELECT id, (SELECT ...) AS total * $query->select(function ($query) { - * return ['article_id', 'total' => $query->count('*')]; + * return ['article_id', 'total' => $query->func()->count('*')]; * }) * ``` *