In addition here is the debug output from the controller. This is from
the _schema array as you can see its of type string.


                                    [ingredient] => Array
                                        (
                                            [type] => string
                                            [null] =>
                                            [default] =>
                                            [length] => 64
                                        )







On Jan 14, 3:22 pm, "[email protected]"
<[email protected]> wrote:
> I am confused. I have changed the column type of a field in my table
> to be a varchar from a foreign key ID field.
>
> I used to use it to generate a select list in my form for ingredient.
> However I have changed the design and now I want to store the
> ingredient as a varchar. For some reason the field is still showing up
> as a select and I cant figure out why. I was hoping someone could
> point me in the right direction.
>
> I thought maybe it was a cache problem so I deleted all the cache
> files.
>
> Here is the input in the add view:
> <?php echo $form->input('IngredientList.'. $index .'.ingredient', array
> ('label' => false)); ?>
>
> I even tried to force it to a text type:
> <?php echo $form->input('IngredientList.'. $index .'.ingredient', array
> ('label' => false, 'type' => 'text')); ?>
>
> Here is the SQL for the table definition:
> CREATE TABLE `ingredient_lists` (
>   `id` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT,
>   `recipe_id` int(10) unsigned zerofill NOT NULL,
>   `ingredient` varchar(64) NOT NULL,
>   `fractional_amount` varchar(3) DEFAULT NULL,
>   `whole_amount` int(2) unsigned DEFAULT NULL,
>   `measurement_type_id` int(10) unsigned zerofill DEFAULT NULL,
>   `description` varchar(255) DEFAULT NULL,
>   `created` datetime DEFAULT NULL,
>   `modified` datetime DEFAULT NULL,
>   PRIMARY KEY (`id`),
>   KEY `measurement_type_id` (`measurement_type_id`),
>   KEY `recipe_id` (`recipe_id`),
>   CONSTRAINT `measurement_type_id` FOREIGN KEY (`measurement_type_id`)
> REFERENCES `measurement_types` (`id`),
>   CONSTRAINT `recipe_id` FOREIGN KEY (`recipe_id`) REFERENCES
> `recipes` (`id`)
> ) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=latin1;
>
> Thanks for any help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to