Skip to content
Advertisement

Insert null or something if value of csv is null

I have a problem uploading a csv to mysql.

I have the following csv. I need to upload the marked fields the max fields the csv can contain are 48 but some csv contain only 36 or less. I have a form which if csv contains 48 cells uploads succesfully to mysql but if the csv is less than 48 I got error.

This is my form:

JavaScript

CSV example:

csv example

Error:

error

Advertisement

Answer

dirty solution but it works

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement