This has been asked before, and the 'official' answer is: Cake doesn't support enums because they are database vendor specific.
MonkeyGirl's suggestion is the way to go :-) On Jan 27, 1:59 pm, "Ronald Chaplin" <[EMAIL PROTECTED]> wrote: > The only caveat that I have run into with this is that the very latest > beta release of 1.2 does not recognize the enum column type when you > try to use bake. I did have this working in 1.2.5XXX however. Just so > that you are aware. Other than that, it works great. > > On 1/26/08, MonkeyGirl <[EMAIL PROTECTED]> wrote: > > > > > > > > How would you get the enum values from the model or controller? > > > By far the easiest way is to go to > >http://cakeforge.org/snippet/detail.php?type=snippet&id=112 > > and copy and paste the code that's there into app_model.php, then you > > can just use lines like the following in your code: > > > $types = $this->Album->getEnumValues('type'); > > > In this example, 'type' is the name of the enum column, Album is the > > model it's in, and 'types' is the variable that will automatically be > > picked up by this line in the view (assuming you're using Cake 1.2 > > with its form helper): > > > echo $form->input('type'); > > > This will give you a dropdown, just like the one you get for foreign > > keys. > > > Hope that helps, > > Zoe. > > -- > Thanks, > Ron Chaplin > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > T73 Software & Designwww.t73-softdesign.com > We'll make all of your wildest > e-Commerce dreams come true! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
