|
|
@ -88,7 +88,7 @@ class SqlCriteria |
|
|
|
$this->sql_expression = 'SELECT COUNT(' . ($select ? $select : '*') . ') as count FROM :table'; |
|
|
|
$select = 'x.count'; |
|
|
|
} |
|
|
|
$count = $this->model->count($this->where, null, $this->group_by, $this->sql_expression, $this->sql_expression_params)->fetchField('count'); |
|
|
|
$count = $this->model->count($select, $this->where, null, $this->group_by, $this->sql_expression, $this->sql_expression_params)->fetchField('count'); |
|
|
|
$this->sql_expression = $sql_expression_backup; |
|
|
|
return $count; |
|
|
|
} |
|
|
|