ZF-10455: Zend_DB SQL Server adapter's limit/offset clause does not function as expected for the last page of results


When using the Zend_Db_Adapter_Pdo_Mssql, an incorrect number of rows are returned when specifying an offset with limit(). For instance, if you have a possible 26 rows in a result set, and you specify a limit of 10 with an offset of 20, you would expect to get back the last 6 rows. This is how the other DB adapters work. With the SQL Server adapter, you get back 10 rows.

This is also discussed in ZF-8148, particularly in the comment by Ankit Aggarwal:… The fix for bug ZF-8148 did not solve this issue.

Possible solutions for SQL Server 2000 and up are discussed at…


No comments to display