Active record -> count

Hi

Ref: - Enh #1244: CActiveRecord::count() now respects GROUP-BY and HAVING settings (Qiang)

count for complex query does not yet work

for:




SELECT trimestre,HOSPITAL,SUM(CANTIDAD) as CANTIDAD FROM

`estadistica`.`Consultas` `t` 

WHERE trimestre BETWEEN 2 and 3 

GROUP BY trimestre,HOSPITAL 



the sql count generate is




SELECT COUNT(DISTINCT trimestre,HOSPITAL) FROM

`estadistica`.`Consultas` `t` 

WHERE trimestre BETWEEN 2 and 3

GROUP BY trimestre,HOSPITAL



but should be:





SELECT COUNT(DISTINCT trimestre,HOSPITAL) 

FROM `estadistica`.`Consultas` `t` 

WHERE trimestre BETWEEN 2 and 3




Try this, tell me if it works for you

i 'll try

i’m not in work place

thanks

[font=arial, sans-serif][size=6]I think in 1.1.5 will be fine [/size][/font]