I am having problems updating a specific field to NULL in MYSQL. $sql = "update tbluser set mode ='".$mode."', paydate = curdate(), [COLOR="red"]cancel_date = '',[/COLOR] where username ='".$_SESSION['UserLogged']."'"; mysql_query($sql) or die("Not Updated.."); Code (markup): In the structure of the table, cancel_date is defined as a DATE, the NULL is set to YES, and the default is NULL. I have tried: cancel_date = NULL cancel_date = ' ' and tried not updating it since it defaults to NULL. But for some reason when the update is executed, the field is being updated to " 1999-11-30". Any clues? Thanks
Hi, try $sql = "update tbluser set mode ='".$mode."', paydate = curdate(), cancel_date=DEFAULT(cancel_date) where username ='".$_SESSION['UserLogged']."'"; mysql_query($sql) or die("Not Updated.."); PHP: Regards