Skip to content

Commit

Permalink
Merged #2230: Fix using "having" with bound params in CActiveRecord::…
Browse files Browse the repository at this point in the history
…count()
  • Loading branch information
klimov-paul committed Mar 21, 2013
2 parents 64a6aa8 + b6f4cdb commit b8eaab4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Version 1.1.14 work in progress
- Bug #2146: CEmailValidator fix when fsockopen() can output uncatched error 'Connection refused (61)' (armab)
- Bug #2159: Fixed SQL syntax for delete command with join in MySQL (serebrov)
- Bug #2184: CDbHttpSession now supports MS SQL Server BLOB data type (cheuschober, resurtm)
- Bug #2201: Cannot use "having" with bound params in CActiveRecord::count() (ivokund)
- Bug #2216: CDbCommandBuilder::createInCondition() has been updated, allowing to pass array of values with mixed keys for the single type column (klimov-paul)
- Enh: Better CFileLogRoute performance (Qiang, samdark)
- Enh: Refactored CHttpRequest::getDelete and CHttpRequest::getPut not to use _restParams directly (samdark)
Expand Down
1 change: 1 addition & 0 deletions framework/db/ar/CActiveFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ public function count($criteria=null)
$sql=$command->getText();
$sql="SELECT COUNT(*) FROM ({$sql}) sq";
$command->setText($sql);
$command->params=$query->params;
return $command->queryScalar();
}
else
Expand Down

0 comments on commit b8eaab4

Please sign in to comment.