BUGFIX: Fixed DataList::relation().

This commit is contained in:
Sam Minnee 2011-03-30 16:51:26 +13:00
parent 25018180c5
commit 8db236f444
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ class HasManyList extends RelationList {
// Apply relation filter
if(is_array($this->foreignID)) {
return "\"$this->foreignKey\" IN ('" .
implode(', ', array_map('Convert::raw2sql', $this->foreignID)) . "')";
implode("', '", array_map('Convert::raw2sql', $this->foreignID)) . "')";
} else if($this->foreignID){
return "\"$this->foreignKey\" = '" .
Convert::raw2sql($this->foreignID) . "'";

View File

@ -52,7 +52,7 @@ class ManyManyList extends RelationList {
// Apply relation filter
if(is_array($this->foreignID)) {
return "\"$this->joinTable\".\"$this->foreignKey\" IN ('" .
implode(', ', array_map('Convert::raw2sql', $this->foreignID)) . "')";
implode("', '", array_map('Convert::raw2sql', $this->foreignID)) . "')";
} else if($this->foreignID){
return "\"$this->joinTable\".\"$this->foreignKey\" = '" .
Convert::raw2sql($this->foreignID) . "'";