MySQL Forums
Forum List  »  Newbie

LOAD DATA INFILE :: PhpMyAdmin Not Working
Posted by: Ki Song
Date: June 09, 2005 07:54AM

I'm importing a list of e-mail addresses into a database for a mailing list. I have the list of customer names and e-mail addresses. The list is approximately 100,000 e-mail addresses. Here is the table structure:

id, smallint(6), autoincrement
name, varchar(128)
email, varchar(128)
format, enum('text', 'html')
encoding, varchar(32)
groups, tinytext
fields, text
code, varchar(8)
banned, smallint(1)
activated, smallint(1)
deleted, smallint(1)
date, datetime

Here is a sample CSV entry located in an external file:

"John Doe1","johndoe1@hotmail.com","html","ISO-8859-1","9","a:0:{}","trialmem","0","1","0","2005-06-07 12:00:00"
"John Doe2","johndoe2@hotmail.com","html","ISO-8859-1","9","a:0:{}","trialmem1","0","1","0","2005-06-07 12:00:00"
"John Doe3","johndoe3@hotmail.com","html","ISO-8859-1","9","a:0:{}","trialmem2","0","1","0","2005-06-07 12:00:00"

These are the fields that are being imported:

name,email,format,encoding,groups,fields,code,banned,activated,deleted,date

This is the SQL Query that is made:
LOAD DATA LOCAL INFILE 'C:\\WINDOWS\\TEMP\\php455E.tmp' REPLACE INTO TABLE `emp3p_subscribers`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'(
`name` ,
`email` ,
`format` ,
`encoding` ,
`groups` ,
`fields` ,
`code` ,
`banned` ,
`activated` ,
`deleted` ,
`date`
)

When I do this, the entry does not import properly.

The respose is that the entries were imported, but when I search for these fields, it does not show the new entries. What is going on? I'm sure it's a syntax error or some other simple error.

Ki Song
kisong@netscape.net
http://www.kisong.com

Options: ReplyQuote


Subject
Written By
Posted
LOAD DATA INFILE :: PhpMyAdmin Not Working
June 09, 2005 07:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.