Articles tagged with "enum bake mysql"
Baked Enums
Moving this snippet over from CakeForge.
This is a preliminary solution to solve the problem of baking your Models's, View's and Controller's with enum keys in the database.
It is not completely automatic and I can only tell you that it works with PHP5 and MySQL 4/5.
As PHPNut stated in trac, the enum columns are too different across databases to make this standard (at least for now).
So if you are using something other than MySQL you will have to change the code in app_model.php accordingly.
[Read more] This is a preliminary solution to solve the problem of baking your Models's, View's and Controller's with enum keys in the database.
It is not completely automatic and I can only tell you that it works with PHP5 and MySQL 4/5.
As PHPNut stated in trac, the enum columns are too different across databases to make this standard (at least for now).
So if you are using something other than MySQL you will have to change the code in app_model.php accordingly.
Latest Comments