Can you should me the CakePHP model query you used to obtain this array? So
I can modify and add SUM() clause. On the other hand you could just sum up
with PHP:
$sum = 0;
foreach($result as $row)
{
$sum += $row['price'];
}
-MI
---------------------------------------------------------------------------
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
BAKE ON!
-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de ERic ZoU
Enviado el: Viernes, 29 de Diciembre de 2006 06:48 a.m.
Para: Cake PHP
Asunto: How to get the SUM for this array? A shopping-chart
Hi, everyone,
I am doing a shopping-chart.
And I have users,goods, and users_goods. There are three tables.
I can add and delete from the app.
I create Users HABTM Goods.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---