I don't know what you mean by format, the file is exported from Magic Downloads statistics page.
If you go here:
http://reamdaysoft.com/magic-downloads/demo.html
you can get a hands on demo of the process. [neutral]
No they are all like that, if there were 10 records there would be 30 columns ie:
"e-mail","Subscribe_to_Newsletter ",""
"ajak@myway.com","on",""
"anthony_knight@hotmail.com","off",""
"abcd@myway.com","on",""
"wxyz@hotmail.com","off",""
etc. etc., because there is no line break, MySQL sees one...
I have no problem with the commas & double-quotes but the 2 records seem to run into each other, how would MySql know where one stopped & the other started?.
I don't have shell access to my hosting account, I tried importing the file as is, using phpMyAdmin & got a column mismatch error. [neutral]
Thanks for all the advice, the problem was that there is an empty column at the end of each record & no line break, so I was trying to insert 6 columns into 2. I added an extra column called blank & did this to get it to work:
INSERT INTO mail( email, Subscribe_to_Newsletter,blank)
VALUES (...
(MySQL 4.1.7 using phpMyAdmin 2.6.0-pl3)
Here's a file called info.csv:
"e-mail","Subscribe_to_Newsletter ",""
"ajak@myway.com","on",""
"anthony_knight@hotmail.com","off",""
I created a table called mail, with 2 columns (e-mail Subscribe_to_Newsletter)
Then ran this query:
INSERT INTO...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.