diff --git a/model/SQLQuery.php b/model/SQLQuery.php index c4a12cad1..2965d062b 100644 --- a/model/SQLQuery.php +++ b/model/SQLQuery.php @@ -999,8 +999,8 @@ class SQLQuery { if($column == null) { if($this->groupby) { $countQuery = new SQLQuery(); - $countQuery->select("count(*)"); - $countQuery->from = array('(' . $clone->sql() . ') all_distinct'); + $countQuery->setSelect("count(*)"); + $countQuery->setFrom('(' . $clone->sql() . ') all_distinct'); return $countQuery->execute()->value();