From 27821643938832da3e4a5a22fbd73371e60b468c Mon Sep 17 00:00:00 2001 From: Franz Holzinger Date: Sat, 22 Nov 2025 10:56:26 +0100 Subject: [PATCH] Enhance documentation for fetchOne() usage Clarify the usage of fetchOne() in count() results. Explain fetchOne once and for all. --- .../ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst b/Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst index 7e4f1ac6df..008686eee3 100644 --- a/Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst +++ b/Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst @@ -233,7 +233,8 @@ Remarks: * Similar to :php:`->select()` query types, :php:`->executeQuery()` with :php:`->count()` returns a result object of type :php:`\Doctrine\DBAL\Result`. - To fetch the number of rows directly, use :php:`->fetchOne()`. + To fetch the number of rows directly, use :php:`->fetchOne()`, which + returns a numeric value of the first column of the resulting row. * The first argument to :php:`->count()` is required, typically :php:`->count(*)` or :php:`->count('uid')` is used, the field name is