Hi, I finally got Counterchache for HABTM running.
I have now got these 3 tables: subcategories - subcategory - maincategory_id - recipe_count recipes_subcategories - recipe_id - subcategory_id maincategories - id - maincategory Each Maincategory has many Subcategories. So when I add a new Recipe, the subcategories table gets updated with recipe_count. I now have a Navigation, which reads out the Maincategories. I would like to get the amount of recipes inside each Mainnavigation. Currently I just use this for my Element: return $this->Maincategory->find('all', array('order'=>array ('Maincategory'=>'asc'), 'recursive' => 0)); Is there any chance to combine this with the recipe_count from the subcategories table or is there a chance that i also get a figure straight written in my maincategories table when i add a recipe? I am a bit confused on that issue, since I am not sure if I use CounterCache right or if it can update the count in 2 tables. Look forward to you guys feeback. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---