开发者

MySQL SET and ENUM types in CakePHP framework

开发者 https://www.devze.com 2023-02-03 20:48 出处:网络
I need to use SET and ENUM types in my CakePHP 1.3 project. I found some advices, but all them are too old (2004-2006) and full of crazy methods, like modifying cake\'s core files. Also, CakePHP devel

I need to use SET and ENUM types in my CakePHP 1.3 project. I found some advices, but all them are too old (2004-2006) and full of crazy methods, like modifying cake's core files. Also, CakePHP developers said that SET and ENUM types are not supported. 开发者_Python百科

Example:

I have

SET('alpha','beta')

field, and I need to use this data as checkboxes in add & edit actions.

Is there any way to add normal support (Form helpers etc.) of SET and ENUM fields?


Maybe these links help

  • baked-enum-fields-reloaded
  • Enumerable Behavior


I prefer this solution: http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/

way more usable than the mysql enum functionatily

0

精彩评论

暂无评论...
验证码 换一张
取 消