-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Query each method does not recognize if there are no more rows #10023
Comments
As for me, it is not a feature - it's a bug, and it affects only MSSQL |
@SilverFire |
yea it's a bug, how to fix? :-( |
So, this can't be fixed in the framework code? $allRows = [];
try {
foreach ($query->each() as $index => $row) {
$allRows[$index] = $row;
}
} catch (\PDOException $e) {
if ($e->getMessage() !== 'SQLSTATE[IMSSP]: There are no more rows in the active result set. Since this result set is not scrollable, no more data may be retrieved.') {
throw $e;
}
} And it works correctly, |
Can't we add the above workaroud to |
…en using `each()` and `batch()`
…en using `each()` and `batch()`
Yes, I've created a PR |
Like mentioned in: #9962 there is a problem with the recognition of the end of a resultset.
Example:
There is a table with 10 entries
after it selects the 10th row it throws an exception:
The text was updated successfully, but these errors were encountered: