Hi,

$this->Model->find('all', array('fields' =>
array('Model.id'.'SUM(Model.price) AS price' ));

Regards


2009/9/30 DAM <[email protected]>

>
> I'm developing web based application.
> example table
> create table item{
> ....
> price decimal(12,2) notnull,
> ....
> }
>
> I want to show sum of price.How I can do it?
>
> SQL query ( SELECT SUM(price) as price FROM.....)
>
> but I want to that implement using cakephp.
>
> Please help me This is for my university project.
>
> >
>


-- 
Edinei L. Cipriani
Desenvolvedor Colégio Trilingue Inovação
www.colegioinovacao.com.br
Cursando Sistemas de Informação  - Unoesc Chapecó 1 Período
Integrante do grupo Fool N Lost de algoritimos computacionais
Fone 49 84149086

--~--~---------~--~----~------------~-------~--~----~
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