Reputation: 8297
I have a PHP/MySQL application that stores "blank" values in some cases as ''
(empty strings) and in other cases as NULL
s.
Having this mixed format certainly causes a problem when comparing, so I’m wondering which one is the better storage mechanism? ''
or NULL
?
Upvotes: 5
Views: 2848
Reputation: 11672
While this is confusing, actually you should store null for a number of reasons :
Upvotes: 8