public function aggregate($aggregate, $field, $force = false)
{
//coding...
// 查询完成后清空聚合字段信息
$this->removeOption('field');
return $result;
}
public function count($field = '*')
{
//coding...
$count = $query->aggregate('COUNT', '*', true);
} else {
$count = $this->aggregate('COUNT', $field, true);
}
}
最佳答案