Commit 15b9f97c by Qiang Xue

Fixed typo in query builder and reverted changes to DbCache.php

parent c09ace8e
...@@ -124,7 +124,7 @@ class DbCache extends Cache ...@@ -124,7 +124,7 @@ class DbCache extends Cache
$query = new Query; $query = new Query;
$query->select(array('id', 'data')) $query->select(array('id', 'data'))
->from($this->cacheTable) ->from($this->cacheTable)
->where(array('in', 'id', (array)$keys)) ->where(array('id' => $keys))
->andWhere('([[expire]] = 0 OR [[expire]] > ' . time() . ')'); ->andWhere('([[expire]] = 0 OR [[expire]] > ' . time() . ')');
if ($this->db->enableQueryCache) { if ($this->db->enableQueryCache) {
......
...@@ -744,7 +744,7 @@ class QueryBuilder extends \yii\base\Object ...@@ -744,7 +744,7 @@ class QueryBuilder extends \yii\base\Object
$parts = array(); $parts = array();
foreach ($condition as $column => $value) { foreach ($condition as $column => $value) {
if (is_array($value)) { // IN condition if (is_array($value)) { // IN condition
$parts[] = $this->buildInCondition('in', array($column, $value), $query); $parts[] = $this->buildInCondition('in', array($column, $value), $params);
} else { } else {
if (strpos($column, '(') === false) { if (strpos($column, '(') === false) {
$column = $this->db->quoteColumnName($column); $column = $this->db->quoteColumnName($column);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment