Hi Brian, I agree that NULL can be used, if you are not specifically tracking/ looking for a "Not answered" value.
If the specification is to have the possibility to know that a field has the value of either "Not answered", "No", "Yes", then I will always define all the valid values (the domain), never relying on a NULL in my range of "values" :) That way I will not have a problem, when later some bright head higher in the organization hierarchy, decides that we need a "Not applicable" value. If I already assumed that NULL equals "Not answered" I would now have a problem! But that is an aside from what the OP asked for, so sorry for that. If I remember correctly, does CakePHP also create the dummy input checkbox for the radiobuttons? And are they the reason for CakePHP saving a 0 value when not selecting either radiobuttons? Maybe you know Brian? John On May 13, 7:27 pm, brian <[email protected]> wrote: > On Wed, May 13, 2009 at 9:18 AM, John Andersen <[email protected]> > wrote: > > > Hi Drake, > > > You should not use a NULL as a meaningfull value (NULL is exactly - no > > value). If you want your questions to reflect the possibilities of: > > 1) Not answered. > > 2) A Yes answer; > > 3) A No answer; > > you should design your column accordingly - to be able to hold three > > values (0 - not answered, 1 - No, 2 - Yes) > > I disagree (you knew someone would, with a subject like NULL). If the > question wasn't answered, NULL is exactly what's needed, as there can > then be no meaningful value associated with the field. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
