cvs: pear /MDB2 package_mssql.php /MDB2/MDB2/Driver mssql.php

[email protected] ("Lorenzo Alberton")
Newsgroups php.pear.cvs
Message-ID <cvsquipo1209817790@cvsserver>
quipo		Sat May  3 12:29:50 2008 UTC

  Modified files:              
    /pear/MDB2/MDB2/Driver	mssql.php 
    /pear/MDB2	package_mssql.php 
  Log:
  fixed bug #11571: when using setLimit(), numRows() returns wrong values
  
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/mssql.php?r1=1.174&r2=1.175&diff_format=u
Index: pear/MDB2/MDB2/Driver/mssql.php
diff -u pear/MDB2/MDB2/Driver/mssql.php:1.174 pear/MDB2/MDB2/Driver/mssql.php:1.175
--- pear/MDB2/MDB2/Driver/mssql.php:1.174	Sat Mar  8 14:18:39 2008
+++ pear/MDB2/MDB2/Driver/mssql.php	Sat May  3 12:29:50 2008
@@ -43,7 +43,7 @@
 // | Author: Frank M. Kromann <[email protected]>                        |
 // +----------------------------------------------------------------------+
 //
-// $Id: mssql.php,v 1.174 2008/03/08 14:18:39 quipo Exp $
+// $Id: mssql.php,v 1.175 2008/05/03 12:29:50 quipo Exp $
 //
 // {{{ Class MDB2_Driver_mssql
 /**
@@ -1094,7 +1094,10 @@
                 'Could not get row count', __FUNCTION__);
         }
         if ($this->limit) {
-            $rows -= $this->limit -1 + $this->offset;
+            $rows -= $this->offset;
+            if ($rows > $this->limit) {
+                $rows = $this->limit;
+            }
             if ($rows < 0) {
                 $rows = 0;
             }
http://cvs.php.net/viewvc.cgi/pear/MDB2/package_mssql.php?r1=1.116&r2=1.117&diff_format=u
Index: pear/MDB2/package_mssql.php
diff -u pear/MDB2/package_mssql.php:1.116 pear/MDB2/package_mssql.php:1.117
--- pear/MDB2/package_mssql.php:1.116	Sat Mar 15 09:49:28 2008
+++ pear/MDB2/package_mssql.php	Sat May  3 12:29:50 2008
@@ -6,6 +6,7 @@
 $version = 'XXX';
 $state = 'beta';
 $notes = <<<EOT
+- fixed bug #11571: when using setLimit(), numRows() returns wrong values
 
 open todo items:
 - explore fast limit/offset emulation (Request #4544)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.