From d9573958bd6a8d3c292f1b0be8dbdc7d2a0f48a5 Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Fri, 30 Jan 2015 23:52:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20SqlCriteria::count()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/SqlModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 );