Link to home
Start Free TrialLog in
Avatar of pingeyeg
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

Open in new window

Screen-shot-2010-01-01-at-4.46.5.png
Avatar of pingeyeg
pingeyeg

ASKER

The table layout is:

table: faculty
fields: id, name
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 "
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
The id is set to auto_increment and the type is set to INT(11)
Any suggestions?
Yeah, each time I try to import, I get the error and only numbers show.  The name field staffs empty.
ASKER CERTIFIED SOLUTION
Avatar of kumaranmca
kumaranmca

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial