Skip to content
This repository
Browse code

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

…count()
  • Loading branch information...
commit b8eaab4eaf994c6d61f811d20c906916c364cadf 2 parents 64a6aa8 + b6f4cdb
Paul Klimov klimov-paul authored

Showing 2 changed files with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  CHANGELOG
  2. +1 0  framework/db/ar/CActiveFinder.php
1  CHANGELOG
@@ -31,6 +31,7 @@ Version 1.1.14 work in progress
31 31 - Bug #2146: CEmailValidator fix when fsockopen() can output uncatched error 'Connection refused (61)' (armab)
32 32 - Bug #2159: Fixed SQL syntax for delete command with join in MySQL (serebrov)
33 33 - Bug #2184: CDbHttpSession now supports MS SQL Server BLOB data type (cheuschober, resurtm)
  34 +- Bug #2201: Cannot use "having" with bound params in CActiveRecord::count() (ivokund)
34 35 - Bug #2216: CDbCommandBuilder::createInCondition() has been updated, allowing to pass array of values with mixed keys for the single type column (klimov-paul)
35 36 - Enh: Better CFileLogRoute performance (Qiang, samdark)
36 37 - Enh: Refactored CHttpRequest::getDelete and CHttpRequest::getPut not to use _restParams directly (samdark)
1  framework/db/ar/CActiveFinder.php
@@ -711,6 +711,7 @@ public function count($criteria=null)
711 711 $sql=$command->getText();
712 712 $sql="SELECT COUNT(*) FROM ({$sql}) sq";
713 713 $command->setText($sql);
  714 + $command->params=$query->params;
714 715 return $command->queryScalar();
715 716 }
716 717 else

0 comments on commit b8eaab4

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