Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of PDO::rowCount() with SELECT statements #113

Closed
uirapuru opened this issue Nov 17, 2017 · 1 comment
Closed

Usage of PDO::rowCount() with SELECT statements #113

uirapuru opened this issue Nov 17, 2017 · 1 comment

Comments

@uirapuru
Copy link

if (0 === $statement->rowCount()) {

Maybe not issue (well, happened for me to return wrong result, but it was really specific case...), but in docs for PDO::rowCount() we find:

If the last SQL statement executed by the associated PDOStatement was a SELECT statement, some > databases may return the number of rows returned by that statement. However, this behaviour is not > guaranteed for all databases and should not be relied on for portable applications.

this is more as a reminder. Thanks, great job with Prooph!

@prolic
Copy link
Member

prolic commented Nov 18, 2017

We have unit tests covering that case, so we can assume it's working as intended, thanks.

@prolic prolic closed this as completed Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants