升级到5.1.28版本

This commit is contained in:
巴掌 committed 2018-11-01 09:01:46 +08:00
1 parent 4bc2bfa35a
commit 81d9f5e5e5
23 files changed
+321 -150

No files matched your search

+5 -1
View File
@@ -1314,7 +1314,11 @@ abstract class Connection
*/
public function aggregate(Query $query, $aggregate, $field)
{
$field = $aggregate . '(' . $this->builder->parseKey($query, $field, true) . ') AS tp_' . strtolower($aggregate);
if (0 === stripos($field, 'DISTINCT ')) {
list($distinct, $field) = explode(' ', $field);
}
$field = $aggregate . '(' . (!empty($distinct) ? 'DISTINCT ' : '') . $this->builder->parseKey($query, $field, true) . ') AS tp_' . strtolower($aggregate);
return $this->value($query, $field, 0);
}