cvs: pear /DB_DataObject DataObject.php
| From: | Alan Knowles | Date: | Mon, 07 Nov 2005 05:47:49 +0000 |
| Subject: | cvs: pear /DB_DataObject DataObject.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-36126@lists.php.net to get a copy of this message | ||
alan_k Mon Nov 7 00:47:49 2005 EDT
Modified files:
/pear/DB_DataObject DataObject.php
Log:
fix bug #5881 - wrap conditions with brackets - This may break things.. but is worth trying to see
if it works
http://cvs.php.net/diff.php/pear/DB_DataObject/DataObject.php?r1=1.386&r2=1.387&ty=u
Index: pear/DB_DataObject/DataObject.php
diff -u pear/DB_DataObject/DataObject.php:1.386 pear/DB_DataObject/DataObject.php:1.387
--- pear/DB_DataObject/DataObject.php:1.386 Sun Oct 30 20:37:17 2005
+++ pear/DB_DataObject/DataObject.php Mon Nov 7 00:47:46 2005
@@ -15,7 +15,7 @@
* @author Alan Knowles <alan@akbkhome.com>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: DataObject.php,v 1.386 2005/10/31 01:37:17 alan_k Exp $
+ * @version CVS: $Id: DataObject.php,v 1.387 2005/11/07 05:47:46 alan_k Exp $
* @link http://pear.php.net/package/DB_DataObject
*/
@@ -591,10 +591,10 @@
}
$r = $this->_query['condition'];
if ($this->_query['condition']) {
- $this->_query['condition'] .= " {$logic} {$cond}";
+ $this->_query['condition'] .= " {$logic} ( {$cond} )";
return $r;
}
- $this->_query['condition'] = " WHERE {$cond}";
+ $this->_query['condition'] = " WHERE ( {$cond} ) ";
return $r;
}