Skip to content

Commit

Permalink
(Fixes issue 1244)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiang.xue committed Sep 1, 2010
1 parent 069cc63 commit 201ee52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Version 1.1.4 to be released
- Enh #1104: Added argument "$" to jQuery block to prevent $ alias conflict (mdomba)
- Enh #1128: Improved error reporting when assets directory does not exist or is not writable (Qiang)
- Enh #1222: Added relations information to Gii generated model's PHPDoc (Sam Dark)
- Enh #1244: CActiveRecord::count() now respects GROUP-BY and HAVING settings (Qiang)
- Enh #1347: Added CPagination::validateCurrentPage (Qiang)
- Enh #1358: Enhanced the 'together' option of HAS_MANY/MANY_MANY relations so that setting it true will ensure the related table is joined with the primary table in a single SQL (Qiang)
- Enh #1359: Added CActiveRecord::countByAttributes (Qiang)
Expand Down
2 changes: 2 additions & 0 deletions framework/db/schema/CDbCommandBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ public function createCountCommand($table,$criteria,$alias='t')
$sql.=" FROM {$table->rawName} $alias";
$sql=$this->applyJoin($sql,$criteria->join);
$sql=$this->applyCondition($sql,$criteria->condition);
$sql=$this->applyGroup($sql,$criteria->group);
$sql=$this->applyHaving($sql,$criteria->having);
$command=$this->_connection->createCommand($sql);
$this->bindValues($command,$criteria->params);
return $command;
Expand Down

0 comments on commit 201ee52

Please sign in to comment.