From bccd018530a0f4a602899eed7ce9f90d41bc6a05 Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Sat, 27 Sep 2014 17:05:33 +0400 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=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=B2=20SqlCriteria.count()=20=D0=B4=D0=BB=D1=8F=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=BE=D0=B2=20=D0=B2=20=D0=BA?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D1=80=D1=8B=D1=85=20=D0=B5=D1=81=D1=82=D1=8C?= =?UTF-8?q?=20=D1=81=D0=B2=D0=BE=D0=B9=20=D0=B8=D0=BD=D0=B4=D0=B8=D0=B2?= =?UTF-8?q?=D0=B8=D0=B4=D1=83=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20select?= =?UTF-8?q?=20=D0=B8=20groupby=20(fix1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/SqlCriteria.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/SqlCriteria.php b/Model/SqlCriteria.php index cd3cb42..a77d153 100644 --- a/Model/SqlCriteria.php +++ b/Model/SqlCriteria.php @@ -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; }