Php 将数据插入mysql数据库表时出现问题:显示DB错误

Php 将数据插入mysql数据库表时出现问题:显示DB错误,php,mysql,configuration,Php,Mysql,Configuration,我有一个名为history的DB表,具有以下模式: CREATE TABLE IF NOT EXISTS `history` ( `id` int(11) NOT NULL, `history_date` datetime DEFAULT NULL, `sql_query` text, `authuser` varchar(200) DEFAULT NULL, `ip` varchar(100) DEFAULT NULL, `authId` int(11) NOT NUL

我有一个名为
history
的DB表,具有以下模式:

CREATE TABLE IF NOT EXISTS `history` (
  `id` int(11) NOT NULL,
  `history_date` datetime DEFAULT NULL,
  `sql_query` text,
  `authuser` varchar(200) DEFAULT NULL,
  `ip` varchar(100) DEFAULT NULL,
  `authId` int(11) NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=618 DEFAULT CHARSET=latin1;
我正在尝试用php运行一个脚本,该脚本返回以下错误:

HIST DB Error :(INSERT into history(history_date,sql_query,ip,authuser,authId) VALUES(1441378485,'UPDATE itemstypes SET typedesc="Keyboard",hassoftware=0 WHERE id="10"','10.16.7.44','superadmin','6')):Incorrect datetime value:1441378485 for column 'history_date' at row 1
如果我通过本地主机的phpmyadmin运行查询
INSERT-into history(history\u date,sql\u query,ip,authuuser,authId)值(1441378485,'UPDATE itemstypes SET typedesc=“Keyboard”,hassoftware=0,其中id=“10”,'10.16.7.44','superadmin','6')
,则会在history\u date列中插入数据类型不匹配,
0000-00-00:00:00
正在存储。 现在,当我在live server中运行相同的程序时,我得到了上面的错误。 可能是什么问题?请让我知道。服务器中是否存在任何配置问题?请帮帮我


提前谢谢。

更改日期格式,如

INSERT into history(history_date,sql_query,ip,authuser,authId)
VALUES(2015-09-16 00:00:00,'UPDATE itemstypes
SET typedesc="Keyboard",hassoftware=0 WHERE id="10"','10.16.7.44','superadmin','6')

更改日期格式,如

INSERT into history(history_date,sql_query,ip,authuser,authId)
VALUES(2015-09-16 00:00:00,'UPDATE itemstypes
SET typedesc="Keyboard",hassoftware=0 WHERE id="10"','10.16.7.44','superadmin','6')

1441378485
不是有效的日期时间格式是
Y-m-d H:i:s
1441378485
不是有效的日期时间格式是
Y-m-d H:i:s
我知道如果我更改日期,它会工作,但为什么我的脚本在运行此查询后会暂停。通常应插入日期不正确的记录。你能告诉我我需要做的任何与ini文件相关的更改吗?我知道如果我更改日期,那么它会工作,但是为什么我的脚本在运行此查询后会停止。通常应插入日期不正确的记录。你能告诉我我需要做的任何与ini文件相关的更改吗?