pingeyeg
asked on
Importing CSV into phpMyAdmin not working
I am trying to import a CSV into phpMyAdmin, but am having issues. I have done some Google searching to find out how to do it yet each time the values tried to go into the id field and the name field is empty. Any help is greatly appreciated.
INSERT INTO `department_school` VALUES ('School of Law', '')# Affected rows: 1
INSERT INTO `department_school` VALUES ('School of Medicine', '')# Affected rows: 1
INSERT INTO `department_school` VALUES ('Goizueta Business School', '')# Affected rows: 1
INSERT INTO `department_school` VALUES ('Rollins School of Public Health', '')# Affected rows: 1
INSERT INTO `department_school` VALUES ('School of Medicine', '')# Affected rows: 1
INSERT INTO `department_school` VALUES ('School of Law', '')# Affected rows: 1
INSERT INTO `department_school` VALUES ('Anthropology, Emory College', '')# Affected rows: 1
INSERT INTO `department_school` VALUES ('English, Emory College', '')# Affected rows: 1
INSERT INTO `department_school` VALUES ('Nell Hodgson Woodruff School of Nursing', '')# Affected rows: 1
INSERT INTO `department_school` VALUES ('ILA, Graduate School of the Arts and Sciences', '')# Affected rows: 1
Screen-shot-2010-01-01-at-4.46.5.png
It looks like it thinks there is a blank field after each value. Also I am assuming that id is an auto_increment field.
Try removing the trailing comma after each value and try again. Easiest way is to string replace ", with just "
Try removing the trailing comma after each value and try again. Easiest way is to string replace ", with just "
actually if it was an auto_increment field it wouldn't allow your text values in to the field... make sure the field is an INT with the auto_increment property
ASKER
The id is set to auto_increment and the type is set to INT(11)
ASKER
Any suggestions?
ASKER
Yeah, each time I try to import, I get the error and only numbers show. The name field staffs empty.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
table: faculty
fields: id, name