Обработка массива term в условии where и строк в том числе.

This commit is contained in:
2014-04-29 19:44:57 +04:00
parent d1c8ecf850
commit 3b390d968b

View File

@ -150,7 +150,10 @@ abstract class SqlDbDriver extends DbDriver
} }
} else { } else {
if (is_array($term)) { if (is_array($term)) {
$term = new DbExpr('(' . implode(',', array_map(function($item){return intval($item);}, $term)) . ')'); foreach ($term as &$val) {
$val = $this->driverQuote($val);
}
$term = new DbExpr('(' . implode(',', $term) . ')');
} }
$term = $this->quoteInto($cond, $term); $term = $this->quoteInto($cond, $term);
} }