php – Invalid column count in CSV input on line 1 Error
php – Invalid column count in CSV input on line 1 Error
If your DB table already exists and you do NOT want to include all the tables columns in your CSV file, then when you run PHP Admin Import, youll need fill in the Column Names field in the Format-Specific Options for CSV – Shown here at the bottom of the following screenshot.
In summary:
- Choose a CSV file
- Set the Format to CSV
- Fill in the Column Names field with the names of the columns in your CSV
- If your CSV file has the column names listed in row 1, set Skip this number of queries (for SQL) or lines (for other formats), starting from the first one to 1
Fixed! I basically just selected Import without even making a table myself. phpMyAdmin created the table for me, with all the right column names, from the original document.
php – Invalid column count in CSV input on line 1 Error
I got the same error when importing a .csv file using phpMyAdmin.
Solution to my problem was that my computer saved the .csv file with ; (semi-colon) as delimiter instead of , (commas).
In the Format-Specific Options you can however chose columns separated: and select ; instead of , (comma).
In order to see what your computer stores the file in, open the .csv file in an text editor.
Related posts on php :
- php – Zend 2 redirect with toRoute not working
- php – How to get url of current theme?
- php – Package php5-gd has no installation candidate
- php – what is the difference between site_url() and base_url()?
- php – regex match any whitespace
- php – How to get cookie value
- php get URL of current file directory
- php – Difference between a normal ajax and long polling