Skip to content

Commit 139a489

Browse files
authored
Enhance documentation for fetchOne() usage (#6225)
Clarify the usage of fetchOne() in count() results. Explain fetchOne once and for all.
1 parent ef897a1 commit 139a489

File tree

1 file changed

+2
-1
lines changed
  • Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder

1 file changed

+2
-1
lines changed

Documentation/ApiOverview/Database/DoctrineDbal/QueryBuilder/Index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ Remarks:
233233

234234
* Similar to :php:`->select()` query types, :php:`->executeQuery()` with
235235
:php:`->count()` returns a result object of type :php:`\Doctrine\DBAL\Result`.
236-
To fetch the number of rows directly, use :php:`->fetchOne()`.
236+
To fetch the number of rows directly, use :php:`->fetchOne()`, which
237+
returns a numeric value of the first column of the resulting row.
237238

238239
* The first argument to :php:`->count()` is required, typically
239240
:php:`->count(*)` or :php:`->count('uid')` is used, the field name is

0 commit comments

Comments
 (0)