Hi guys! I'm very new to cakephp and i'm working on my first cake project and i would really appreciate if someone can point me in the right direction!
the basic structure of my models: model->variant->price model (id, name) variant (id, name, model_id) price (id,price,model_id, variant_id) i'm trying to create a car site For example, there are 3 models and each model has a couple of variants and each variant has its own price models => BMW 3 Series, Audi A4, Golf GTi variants => BMW 3 Series -> 2.0, 3.0, 4.0 Audi A4 -> 5.0, 6.0 Golf Gti -> 2.0, 4.0 prices => BMW 3 Series -> 2.0 -> 20000 BMW 3 Series -> 3.0 -> 30000 BMW 3 Series -> 4.0 -> 40000 Audi A4 -> 5.0 -> 30000 Audi A4 -> 6.0 -> 40000 Golf Gti -> 2.0 -> 24000 Golf GTi -> 4.0 -> 29000 my question is how can i calculate the max and min price of each model? For example, on the model index page, i want to display the price range of BMW 3 series, eg, BMW 3 Series ($20000 - $40000)? I can do this in sql by selecting the MAX and MIN value of the prices, joining the price and model tables and group by the model, so how can i do this is cakephp? thanks in advance Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en