Browse Source

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

namespace
Alexander Demidov 11 years ago
parent
commit
3b390d968b
  1. 5
      model/SqlDbDriver.php

5
model/SqlDbDriver.php

@ -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);
} }

Loading…
Cancel
Save