For yes/no radioboxes on a form, you'll need to use
enum('1', '0')
as your data type, where 1 = 'yes' and 0 = 'no', but you could use whatever labels you wanted, eg. 999 = 'yes' and 666 = 'no'.
Mind you, enum is pretty cool, because unlike the narrowminded boolean, enum will allow you to extend your list of options, eg.
For a form with a drop-down box containing the following options:
- Yes
- No
- Occasionally
- Prefer not to answer
You could use
enum('1', '0', '2', '3')
as your data type.In this example, 'Yes' = 1, 'No' = 0, 'Occasionally' = 2, and 'Prefer not to answer' = 3.
1 comment:
Yes MySQL is cool!
http://tinyurl.com/2hljh6
Post a Comment