A
Anonymous
Guest
Hello,
I am building a work order module for my companies intranet. One of the fields is when is the work to be done by? If they choose "before" or "after" then the specific_date field is required, and used for the insert. If they choose "Anytime" that means the specific_date field becomes a moot point, so I don't pass any data to my mysql insert query. If I do not pass mysql a valid date, I get an error message:
Incorrect date value: '' for column 'specific_date' at row 1
How can I pass an exceptable "null" value to MySql, I tried setting the field to not null but that didn't make any differance. According to the MySql man pages, if I pass NULL (no quotes or tics) it should work but I couldn't get that to work either.
Thanks
I am building a work order module for my companies intranet. One of the fields is when is the work to be done by? If they choose "before" or "after" then the specific_date field is required, and used for the insert. If they choose "Anytime" that means the specific_date field becomes a moot point, so I don't pass any data to my mysql insert query. If I do not pass mysql a valid date, I get an error message:
Incorrect date value: '' for column 'specific_date' at row 1
How can I pass an exceptable "null" value to MySql, I tried setting the field to not null but that didn't make any differance. According to the MySql man pages, if I pass NULL (no quotes or tics) it should work but I couldn't get that to work either.
Thanks