Please help! I had tried a search, but came up with similar situations, but not enough to make heads or tails of why this is happening.
Problem:
I have a form that users are filing out to keep track of suppliers issues. Fourof the fields are date values. I am making the users enter dates in yyyy-mm-dd format to make it easier for the time being. 37 fields are filled-in (or not) and the form is submitted. Three of the date fields are for future dates (date closed for example.) They shouldn't have any values entered into them.
Issue/Question:
Why is it that when they submit the form, the date fields are filled in with '0000-00-00' instead of just blank or NULL? I do a test for outstanding open issues by querying all records that have date_closed as NULL, but all records that have gotten entered/updated through the web site have 0000-00-00 in them, and the NULL test doesn't work. I could test for '= 0 or NULL' but 0 shouldn't be a valid date. Why does the 0 get entered into the record? The display of the query statement shows " ...date_closed='',..." and yet 0 shows up.
Thanks for any help, I hope this was enough information (maybe too much?).