I'm currently playing around with phpMyAdmin and I have encountered a problem. When importing my CSV into phpMyAdmin it's rounding the numbers. I have set the column to be a float and the column in Excel to be a Number (Also tried text/General) to no avail. Has anyone else encountered this issue and found a viable work-around?
A second question, is it possible for me to upload the CSV file so that it matches the column names in phpMyAdmin to Excel column names and enters the data in the correct column?
- Your file should be look like this(decimal fields are of general type):
xlssheet
- Save as CSV. File will be probably saved with ; separated
This is for new table:
- Open phpMyAdmin, choose your database, click to import and select file to upload
- Change format to CSV if there is not selected
- Change in format specific options - columns separated with: ;
- Be sure that checkbox (The first line of the file contains the table column names (if this is unchecked, the first line will become part of the data)) is SELECTED
- Click Go
- New table will be created with the structure according to the forst line in CSV.
This is for existing table:
- Open phpMyAdmin, choose your database, CHOOSE YOUR TABLE which match the structure of imported file, click to import and select file to upload
- Change format to CSV if there is not selected
- Change in format specific options - columns separated with: ;
- Change skip number of queries to 1 (this will skip the first line with column names)
- Click Go
- Selected table wich has the same structure as CSV will be updated and rows in CSV inserted.