修正聚合查询返回null的问题

This commit is contained in:
thinkphp
2017-07-06 23:23:06 +08:00
parent 7445dce2e8
commit 5c1d516a65

View File

@@ -415,8 +415,9 @@ class Query
}
$result = $pdo->fetchColumn();
if ($force) {
$result = is_numeric($result) ? $result + 0 : $result;
$result += 0;
}
if (isset($cache)) {
// 缓存数据
$this->cacheData($key, $result, $cache);