diff --git a/Model/SqlModel.php b/Model/SqlModel.php index 047332e..3f99f75 100644 --- a/Model/SqlModel.php +++ b/Model/SqlModel.php @@ -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 );