Thank you for your input.
On 10/25/06, nate <[EMAIL PROTECTED]> wrote:
This is interesting. I have these Modles, however my setup is Order HABTM Item (link table Items_orders). Then when I want to add items to the order I use bindModel to create a hasMany association between Order and ItemsOrder.I'm interested to know why you chose the above associations?
This is along the lines of what I had initially planned. How would the above handle a port to PostgreSQL?
Same question as above.
This sounds great, as usual :)
Cheers,
Sonic
Theoretical Example: Order hasMany OrderItem, OrderItem belongsTo
Order, Item:
This is interesting. I have these Modles, however my setup is Order HABTM Item (link table Items_orders). Then when I want to add items to the order I use bindModel to create a hasMany association between Order and ItemsOrder.
$this->OrderItem->find(
'Order.date BETWEEN "' . date('Y-m-d') . '" AND "' . date('Y-m-d',
strtotime('-1 month')) . '"',
'SUM(Item.price) As total'
);
This is along the lines of what I had initially planned. How would the above handle a port to PostgreSQL?
If you wanted to calculate that including the tax per order, you could
easily drop in a sub-select.
Same question as above.
We're looking at some more advanced ways
to build queries in Cake 1.2.
This sounds great, as usual :)
Cheers,
Sonic
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---