Theoretical Example: Order hasMany OrderItem, OrderItem belongsTo
Order, Item:
$this->OrderItem->find(
'Order.date BETWEEN "' . date('Y-m-d') . '" AND "' . date('Y-m-d',
strtotime('-1 month')) . '"',
'SUM(Item.price) As total'
);
If you wanted to calculate that including the tax per order, you could
easily drop in a sub-select. We're looking at some more advanced ways
to build queries in Cake 1.2.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---