此查询在我的本地计算机上工作正常,但在服务器上给出错误解决方案在中尝试对contact_id使用NULL代替''insert into contactform values(NULL,......hi every one i have a problem in mysqlmy table is CREATE TABLE IF NOT EXISTS `contactform` ( `contact_id` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(50) NOT NULL, `addition` varchar(50) NOT NULL, `surname` varchar(50) NOT NULL, `Address` varchar(200) NOT NULL, `postalcode` varchar(20) NOT NULL, `city` varchar(50) NOT NULL, `phone` varchar(20) NOT NULL, `emailaddress` varchar(30) NOT NULL, `dob` varchar(50) NOT NULL, `howtoknow` varchar(50) NOT NULL, `othersource` varchar(50) NOT NULL, `orientationsession` varchar(20) NOT NULL, `othersession` varchar(20) NOT NULL, `organisation` int(11) NOT NULL, `newsletter` int(2) NOT NULL, `iscomplete` int(11) NOT NULL, `registrationdate` date NOT NULL, PRIMARY KEY (`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=39 ; mysql>insert into contactform values('','abhi','sir','shukla','vbxcvb','342342','asdfasd','234234234','[email protected]','1999/5/16','via vrienden of familie','','19','20','6','1','1','2010-03-29')i get following error. #1366 - Incorrect integer value: '' for column 'contact_id' at row 1this query work fine on my local machine but give error on server 解决方案 Try using NULL instead of '' for contact_id in insert into contactform values(NULL,...... 这篇关于#1366-不正确的整数值:MYsql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-11 03:44