#1292 - Incorrect date value: #39;0000-00-00#39;(#1292 - 不正确的日期值:0000-00-00)
问题描述
我参考了许多与我的标题相同的问题,但它们的方法和问题不同,所以这个问题不是重复的.
I referenced many questions which have the same title as mine, but they have a different approach and different issue so this question is not a duplicate.
我有一个表,其中 column
fm_sctrdate
是 date
类型并且具有默认值 0000-00-00代码>.
I have a table in which column
fm_sctrdate
is a date
type and has the default value 0000-00-00
.
通过网站插入工作正常,但是当我尝试通过 phpmyadmin
插入任何值时,出现以下错误.
Insertion by website is working fine but when I try to insert any value by phpmyadmin
then I got following error.
Mysql
版本是 5.7.11
.最近我们的服务器从 mysqlnd 5.0.12
升级到 5.7.11
.
Mysql
version is 5.7.11
. One more thing recently our server has been upgrade from mysqlnd 5.0.12
to 5.7.11
.
这里是查询
INSERT INTO `iavlif_fmp_clientquote` (`jm_cqid`, `fmsq_id`, `fmsg_id`,
`fm_sctrdate`, `fm_sctrtime`, `fm_sctbaggage_weight`,
`fm_sctfreight_weight`, `fm_sctpassenger`, `fm_sctinfant`,
`fm_sctinfant_details`, `fm_sctinfant_dob`, `fmtp_id`, `fmtpi_id`,
`jmcnt_id`, `fm_name`, `fm_company`, `fm_email`, `fm_phone`, `fmts_id`,
`jmts_id`, `fm_pax_nbr`, `fm_hours_nbr`, `fmqt_id`, `fmtr_id`,
`fm_sctnotes`, `fm_locdepart`, `fm_locarrive`, `fm_sctconsignment_weight`,
`fm_sctconsignment_dimensions`, `fm_sctconsignment_desc`, `fm_sctdangerous`,
`fm_scturgent`, `fm_sctspecial_instructions`, `fm_sctquote_type`,
`fm_sctwork_type`, `fm_sctreoccuring`, `fm_sctaccommodation`, `fm_sctcar`,
`fm_recdate`, `fm_recenddate`, `fm_recfrequency`, `fm_rectime`,
`fm_medical`, `fm_medical_details`, `fm_user_ip`, `fm_dang_details`,
`fm_sctsubstance`, `fm_sctpurchase_number`, `fm_role_id`, `fm_myrole_id`,
`jm_myrole_id`, `fm_sctwork_point`, `fm_locdepartarrive`, `fm_sctnbr`,
`fm_dateCreated`, `fm_cc`, `fm_gl`, `fm_timeCreated`, `jm_qtid`, `jmtp_id`,
`jmtpi_id`, `jmsg_id`, `jms_id`, `jmsq_id`, `fms_id`, `fmcq_id`) VALUES
(NULL, '1', '1', '0000-00-00', '1', '1', '1', 'sdfasd', 'No',
'sdafdsafdsaf', 'dsfas', 'sdfasd', 'dsafds', '0', 'asdfds', 'sdfasd',
'sdfads', 'sdaf', 'sdaf', 'sdaf', '0', '0', '0', '1sadfasdsda', 'sdfadsf',
'as', 'as', 'as', 'asas', 'asd', 'No', 'No', 'adsfsd', 'eqwrqew', 'qewrqew',
'No', 'No', 'No', '0000-00-00', '0000-00-00', 'ewqr', 'qewrw', 'No', 'eqwr',
'ewqr', 'qewr', '', '', '', '', '', '', '', '0', '0000-00-00', '', '',
'00:00:00.000000', '', '', '', '', '', '', '', NULL)
我们在升级 mysql
推荐答案
该错误是由于 sql 模式,根据最新的 MYSQL 5.7 文档可以是严格模式.
The error is because of the sql mode which can be strict mode as per latest MYSQL 5.7 documentation.
欲了解更多信息,请阅读这个.
For more information read this.
希望有帮助.
这篇关于#1292 - 不正确的日期值:'0000-00-00'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:#1292 - 不正确的日期值:'0000-00-00'


- 更改自动增量起始编号? 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- SQL 临时表问题 2022-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01