Browse Source

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

namespace
Alexander Demidov 10 years ago
parent
commit
d9573958bd
  1. 2
      Model/SqlModel.php

2
Model/SqlModel.php

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

Loading…
Cancel
Save