cvs: php4 /pear/DB common.php
| From: | Thomas V.V.Cox | Date: | Fri, 02 Nov 2001 00:41:27 +0000 |
| Subject: | cvs: php4 /pear/DB common.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1235@lists.php.net to get a copy of this message | ||
cox Thu Nov 1 19:41:27 2001 EDT
Modified files:
/php4/pear/DB common.php
Log:
do the query transformation, don't use options property and remove the
not capable error as always the row limit support is avaible
Index: php4/pear/DB/common.php
diff -u php4/pear/DB/common.php:1.68 php4/pear/DB/common.php:1.69
--- php4/pear/DB/common.php:1.68 Wed Oct 31 10:08:51 2001
+++ php4/pear/DB/common.php Thu Nov 1 19:41:27 2001
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: common.php,v 1.68 2001/10/31 15:08:51 cox Exp $
+// $Id: common.php,v 1.69 2001/11/02 00:41:27 cox Exp $
//
// Base class for DB implementations.
//
@@ -46,11 +46,13 @@
var $options = array(
'persistent' => false, // persistent connection?
'optimize' => 'performance', // 'performance' or
'portability'
- 'debug' => 0, // numeric debug level
- 'limit' => 'emulate' // 'emulate' => emulate
with fetch row by number
- // 'alter' => alter the query
- // false => no support for limit queries
+ 'debug' => 0 // numeric debug level
);
+ /*
+ var $features['limit'] => 'emulate' // 'emulate' => emulate
with fetch row by number
+ // 'alter' => alter the query
+ // false => no support for limit queries
+ */
var $dbh;
// }}}
@@ -483,9 +485,7 @@
function limitQuery($query, $from, $count)
{
- if($this->options['limit'] == false) {
- return $this->raiseError(DB_ERROR_NOTCAPABLE);
- }
+ $query = $this->modifyLimitQuery($query, $from, $count);
$result = $this->simpleQuery($query);
if (DB::isError($result) || $result === DB_OK) {
return $result;