jakebur01 Posted January 9, 2009 Share Posted January 9, 2009 Is there any way to make a default value for empty fields or to get mysql to over look this? The file has been uploaded as MTD.22610.txt Row 17 doesn't contain data for all columns code: $query = "load data infile \"$source_file\" INTO TABLE $table_name FIELDS TERMINATED BY ','"; Quote Link to comment https://forums.phpfreaks.com/topic/140197-solved-doesnt-contain-data-for-all-columns/ Share on other sites More sharing options...
jakebur01 Posted January 9, 2009 Author Share Posted January 9, 2009 I tried making the fields null and also tried giving them a default value in mysql. No luck yet.. Quote Link to comment https://forums.phpfreaks.com/topic/140197-solved-doesnt-contain-data-for-all-columns/#findComment-733722 Share on other sites More sharing options...
jakebur01 Posted January 9, 2009 Author Share Posted January 9, 2009 altered table to myisam. This fixed everything. Thanks, Jake Quote Link to comment https://forums.phpfreaks.com/topic/140197-solved-doesnt-contain-data-for-all-columns/#findComment-733743 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.