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? 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...
requinix Posted June 10, 2013 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. 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 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
Archived
This topic is now archived and is closed to further replies.