Skip to content
Snippets Groups Projects
Commit 0367dbda authored by Susanne Moog's avatar Susanne Moog Committed by Benni Mack
Browse files

[BUGFIX] Statement::rowCount not reliable for SELECT queries

Concerning the usage of Statement::rowCount() the Doctrine DBAL
documentation states the following:

  Returns the number of rows affected by the last
  DELETE, INSERT, or UPDATE statement
  executed by the corresponding object.

For default configurations using MySQL as platform,
rowCount() is returning the expected
value for SELECT statements as well.
However, on other DBMS this value will be zero
as mentioned in the documentation - for instance
SQLite is a candidate for that.

For retrieving the row count for given criteria, the count()
expression has to be used explicitly.

Resolves: #78129
Releases: master
Change-Id: Id28d72a1a21e8615ec45b63d4aecc100d03a39a3
Reviewed-on: https://review.typo3.org/50083


Reviewed-by: default avatarOliver Hader <oliver.hader@typo3.org>
Tested-by: default avatarOliver Hader <oliver.hader@typo3.org>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent fd9e620a
Branches
Tags
No related merge requests found
Showing
with 70 additions and 29 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment