rarebit Posted June 10, 2013 Share Posted June 10, 2013 Hi, I wrote some code a fair while ago now and just trying to use it again. The code works fine on my Linux distro, but on Windows i'm getting an error... MYSQL ERROR: Incorrect integer value: '' for column 'id' at row 1USING: INSERT INTO log_rec VALUES('','127.0.0.1','1370900361','404','GET','xyz',xyz','xyz') Basically 'id' is an int not null autoincrement, and I pass it an empty string. Do you know what the issue is? Quote Link to comment https://forums.phpfreaks.com/topic/279009-incorrect-integer-value-for-column-id-at-row-1/ Share on other sites More sharing options...
Solution requinix Posted June 10, 2013 Solution Share Posted June 10, 2013 You can't use an empty string for an INT AUTO_INCREMENT. Either omit the column entirely or use NULL (or 0) as the value. Quote Link to comment https://forums.phpfreaks.com/topic/279009-incorrect-integer-value-for-column-id-at-row-1/#findComment-1435214 Share on other sites More sharing options...
rarebit Posted June 10, 2013 Author Share Posted June 10, 2013 You're a star, thankyou Quote Link to comment https://forums.phpfreaks.com/topic/279009-incorrect-integer-value-for-column-id-at-row-1/#findComment-1435217 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.