mySQL语法错误
投掷mySQL语法错误,mysql,Mysql,投掷 INSERT into error_log (id_user, id_error, severity, date) VALUES ('93, '1', '6', '1285886665') 桌子 使用: 问题是id\u用户 文本值需要用单引号括起来,如date列。但是整数不需要用单引号括起来,尽管MySQL会隐式地将数据类型转换为列的任何形式。。。否则会抛出错误。('93,
INSERT into error_log
(id_user, id_error, severity, date)
VALUES
('93, '1', '6', '1285886665')
桌子
使用:
问题是id\u用户
文本值需要用单引号括起来,如
date
列。但是整数不需要用单引号括起来,尽管MySQL会隐式地将数据类型转换为列的任何形式。。。否则会抛出错误。('93,
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1', '6', '1285886794')' at line 4
CREATE TABLE `error_log` (
`id` int(25) NOT NULL auto_increment,
`id_user` int(25) NOT NULL,
`id_error` int(5) NOT NULL,
`severity` int(2) NOT NULL,
`date` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
INSERT into error_log
(id_user, id_error, severity, `date`)
VALUES
(93, 1, 6, '1285886665')