Skip to content
Browse files

Merged #2230: Fix using "having" with bound params in CActiveRecord::…

…count()
  • Loading branch information...
2 parents 64a6aa8 + b6f4cdb commit b8eaab4eaf994c6d61f811d20c906916c364cadf @klimov-paul klimov-paul committed Mar 21, 2013
Showing with 2 additions and 0 deletions.
  1. +1 −0 CHANGELOG
  2. +1 −0 framework/db/ar/CActiveFinder.php
View
1 CHANGELOG
@@ -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)
View
1 framework/db/ar/CActiveFinder.php
@@ -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

0 comments on commit b8eaab4

Please sign in to comment.
Something went wrong with that request. Please try again.