Исправление SqlCriteria::count()

This commit is contained in:
2015-01-30 23:52:16 +03:00
parent d5a2da7cbf
commit d9573958bd

View File

@ -234,7 +234,7 @@ abstract class SqlModel extends Model
'SELECT (' .
(($sql_expression) ? $sql_expression : ('SELECT * FROM ' . $this->identify($this->table())))
. (($where) ? (' WHERE ' . $where) : '')
. (($group_by) ? (' GROUP BY ' . $group_by) : '') . ') AS count',
. (($group_by) ? (' GROUP BY ' . $group_by) : '') . ' LIMIT 1) AS count',
$sql_expression_params,
$cache_key
);