cvs: pear /DB_DataObject DataObject.php
| From: | Alan Knowles | Date: | Tue, 16 Jan 2007 02:49:03 +0000 |
| Subject: | cvs: pear /DB_DataObject DataObject.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44238@lists.php.net to get a copy of this message | ||
alan_k Tue Jan 16 02:49:03 2007 UTC
Modified files:
/pear/DB_DataObject DataObject.php
Log:
fix bug #9834 - SQL2003 standards on Joins - adds brackets around ON() - hopefully this doesnt
break anything!
http://cvs.php.net/viewvc.cgi/pear/DB_DataObject/DataObject.php?r1=1.425&r2=1.426&diff_format=u
Index: pear/DB_DataObject/DataObject.php
diff -u pear/DB_DataObject/DataObject.php:1.425 pear/DB_DataObject/DataObject.php:1.426
--- pear/DB_DataObject/DataObject.php:1.425 Tue Jan 9 04:46:38 2007
+++ pear/DB_DataObject/DataObject.php Tue Jan 16 02:49:03 2007
@@ -15,7 +15,7 @@
* @author Alan Knowles <alan@akbkhome.com>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: DataObject.php,v 1.425 2007/01/09 04:46:38 alan_k Exp $
+ * @version CVS: $Id: DataObject.php,v 1.426 2007/01/16 02:49:03 alan_k Exp $
* @link http://pear.php.net/package/DB_DataObject
*/
@@ -3229,7 +3229,7 @@
$key_count = count($ofield);
for($i = 0; $i < $key_count; $i++) {
if ($i == 0) {
- $this->_join .= " ON {$joinAs}.{$ofield[$i]}={$table}.{$tfield[$i]}
";
+ $this->_join .= " ON ({$joinAs}.{$ofield[$i]}={$table}.{$tfield[$i]})
";
}
else {
$this->_join .= " AND {$joinAs}.{$ofield[$i]}={$table}.{$tfield[$i]}
";
@@ -3237,7 +3237,7 @@
}
$this->_join .= ' ' . $appendJoin . ' ';
} else {
- $this->_join .= " ON {$joinAs}.{$ofield}={$table}.{$tfield} {$appendJoin}
";
+ $this->_join .= " ON ({$joinAs}.{$ofield}={$table}.{$tfield})
{$appendJoin} ";
}
break;