Results 1 to 4 of 4
Jan 4, 2005, 04:28 #1
- Join Date
- Jan 2001
- Lisboa : Portugal
- 0 Post(s)
- 0 Thread(s)
A field with a numeric value or unlimited
I need a field to have a numeric value, or a value representing unlimited.
Is it better to make this a numeric type field and use NULL for unlimited (i'm a bit worried about null!=0, since a very common value in this field would be 0), or simply making it a varchar - but only as a backup alternative since since i'd like to be able to, for instance, do a query where field>0 and stuff like that - I can't do that on a varchar, can I?
So basically I'm looking for some pointers for how to differentiate between having null as the value, and 0 as the value, both in mysql and php.
If anyone can throw me some tips it'd help me a lot!Duarte Carrilho da Graša
RailsHelp.com: Searchable Rails reference
CACA: Committee for the Annihilation of Complicated Acronyms