cvs: pear /DB/DB common.php

From: Date: Sat, 07 Jun 2003 18:34:49 +0000
Subject: cvs: pear /DB/DB common.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-10756@lists.php.net to get a copy of this message
cox Sat Jun 7 14:34:49 2003 EDT Modified files: /pear/DB/DB common.php Log: Fix limit options settings passed to the result obj in limitQuery Index: pear/DB/DB/common.php diff -u pear/DB/DB/common.php:1.16 pear/DB/DB/common.php:1.17 --- pear/DB/DB/common.php:1.16 Mon May 19 16:45:31 2003 +++ pear/DB/DB/common.php Sat Jun 7 14:34:49 2003 @@ -16,7 +16,7 @@ // | Author: Stig Bakken <ssb@php.net> | // +----------------------------------------------------------------------+ // -// $Id: common.php,v 1.16 2003/05/19 20:45:31 ssb Exp $ +// $Id: common.php,v 1.17 2003/06/07 18:34:49 cox Exp $ // // Base class for DB implementations. // @@ -758,15 +758,12 @@ function &limitQuery($query, $from, $count, $params = array()) { $query = $this->modifyLimitQuery($query, $from, $count); - $result = $this->query($query, $params); - if (DB::isError($result) || get_class($result) == 'db_result' || - $result === DB_OK) { - return $result; - } else { - $options['limit_from'] = $from; - $options['limit_count'] = $count; - return new DB_result($this, $result, $options); - } + $result = $this->query($query, $params); + if (get_class($result) == 'db_result') { + $result->setOption('limit_from', $from); + $result->setOption('limit_count', $count); + } + return $result; } // }}}

« previous php.pear.cvs (#10756) next »