Browse Source

Fixes #865.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
2e01c06a4b
  1. 10
      framework/yii/db/QueryBuilder.php

10
framework/yii/db/QueryBuilder.php

@ -912,11 +912,6 @@ class QueryBuilder extends \yii\base\Object
protected function buildCompositeInCondition($operator, $columns, $values, &$params)
{
foreach ($columns as $i => $column) {
if (strpos($column, '(') === false) {
$columns[$i] = $this->db->quoteColumnName($column);
}
}
$vss = array();
foreach ($values as $value) {
$vs = array();
@ -931,6 +926,11 @@ class QueryBuilder extends \yii\base\Object
}
$vss[] = '(' . implode(', ', $vs) . ')';
}
foreach ($columns as $i => $column) {
if (strpos($column, '(') === false) {
$columns[$i] = $this->db->quoteColumnName($column);
}
}
return '(' . implode(', ', $columns) . ") $operator (" . implode(', ', $vss) . ')';
}

Loading…
Cancel
Save