Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Error with date field
Re: Error with date field [message #7830 is a reply to message #7829] Tue, 04 April 2023 04:44 Go to previous messageGo to previous message
AJM is currently offline  AJM
Messages: 2350
Registered: April 2006
Location: Surrey, UK
Senior Member
If a date field is only valid when certain conditions are met then it should be nullable (not defined with NOT NULL). I am using MySQL version 8.0.32 with SQL_MODE set to
ANSI_QUOTES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_ENGINE_SUBSTITUTION
and this prevents me from setting a date field to '' instead of NULL.

As I said in an earlier post, if you do not have NO_ZERO_IN_DATE,NO_ZERO_DATE set then inserting an invalid date (such as an empty string) MySQL will instead replace it with '0000-00-00'.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PHP 8 - ListViewPrintAfter()
Next Topic: File classes/mnu_chart.class.inc is missing
Goto Forum:
  


Current Time: Tue May 14 16:11:51 EDT 2024

Total time taken to generate the page: 0.01247 seconds