Hi Richard,

I solved it already with adding array_count_values after the find(). 
Works just fine.

Thanks anyway!

(And sorry for the first post in German. It was a bit early...)

Regards
Guenther


Richard wrote:
> Sehr geehrter Herren -
> 
> Ich glaube sie können dies mit GROUP BY. Zum Beispiel:
> 
> array('fields'=>array('Product.type','MIN(Product.price) as price'), 'group'
> => 'Product.type');
> 
> http://book.cakephp.org/view/74/Complex-Find-Conditions
> 
> 
> Mit freundlich Gruessen
> Richard
> 
> 
> 
> Dear Günther,
> 
> I think you can achieve what you're asking for with a GROUP BY query, for
> example:
> 
>  array('fields'=>array('Product.type','MIN(Product.price) as price'), 'group'
> => 'Product.type');
> 
> http://book.cakephp.org/view/74/Complex-Find-Conditions
> 
> All the best,
> Richard
> 
> 2009/4/17 Günther Theilen <[email protected]>
> 
>> Moin,
>>
>> ist es möglich find('list') mit COUNT zu kombinieren?
>> Ich möchte eine Liste erhalten mit dem Wert eines Feldes als key und der
>> Häufigkeit des Auftretens als value.
>> Geht das mit cake-Bordmitteln? Oder muss ich das Ergebnis einer
>> find('list')-Abfrage in php auswerten (zählen)?
>>
>> Danke und Grüße
>> Günther
>>
> 
> > 
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to