You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When running a query and re-using the same WHERE and LIMIT settings for the countAllResults, the count will be zero is the offset parameter to get() is > 0.
For example this code will produce the wrong $total count:
The get() is configured not to reset the QB state and thus the LIMIT 50, 50 will be in effect when running the countAllResults() query. Since LIMIT 50, 50 is in effect, the first (and only) result row of the the COUNT(*) query is lost.
CodeIgniter 4 version
4.0.0-beta4
Affected module(s)
Database\BaseBuilder
Expected behavior, and steps to reproduce if appropriate
Getting anything else than zero back.
Context
PHP 7.3.8
The text was updated successfully, but these errors were encountered:
Describe the bug
When running a query and re-using the same WHERE and LIMIT settings for the countAllResults, the count will be zero is the offset parameter to get() is > 0.
For example this code will produce the wrong $total count:
The get() is configured not to reset the QB state and thus the LIMIT 50, 50 will be in effect when running the countAllResults() query. Since LIMIT 50, 50 is in effect, the first (and only) result row of the the COUNT(*) query is lost.
CodeIgniter 4 version
4.0.0-beta4
Affected module(s)
Database\BaseBuilder
Expected behavior, and steps to reproduce if appropriate
Getting anything else than zero back.
Context
PHP 7.3.8
The text was updated successfully, but these errors were encountered: