升级到5.1.28版本
This commit is contained in:
1 parent
4bc2bfa35a
commit
81d9f5e5e5
23 files changed
+321
-150
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user