Related model confusion

2008-12-26 Thread rhythmicde...@gmail.com
I am still having a problem with related models and I cant seem to find the example that will help me figure it out. I have tables: recipes, ingredients and ingredient_lists (the SQL for these is below) The combination of ingredients and their amounts are stored in the ingredient_lists table

Related model confusion - Solved

2008-12-26 Thread rhythmicde...@gmail.com
I solved the problem. The trick is to add the ID of the ingredient like so: echo $form-input ('IngredientList.'.$x.'.id', array('type'='hidden')); You can see it in context below. ?php $x = 0; foreach($ingredient_list as $ingredient) { ? table tr td?php echo