At the moment I am checking if(!is_null($foo)) although this is breaking when the mysql column is a date and defaults to 0000-00-00.
Is there any way to get around this problem without adding != "0000-00-00"
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Change your table definition for the date column
I always suggest to allow
NULLfor optional fields and to soundly distinguish between valid values like0and empty strings on the one hand andNULL(=not stated) on the other hand.