My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 25: import into mysql
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by john.g.h...@gmail.com, Oct 17, 2009
I can't seem to get my query right to import the tweetake csv into mysql.
Have you tried it?

Im using phpmyadmin to import the downloaded csv file into a table where I
have setup the same field names, in the same order as the csv file.

I'm choose 'CSV using LOAD DATA'
Fields terminated by: ,
Fields enclosed by: [delete default value, leave blank]
Fields escaped by: [delete default value, leave blank]
Lines terminated by: [leave default value]
Column names: type,id,name...

If I tell mysql to skip the first record, nothing is returned.  If I do'nt
skip the first line, I get one row imported full of unreadable characters.


Could you help me?  If I could recommend a feature it might be a php script
that could get this into mysql rather than excel.  I'm running PHP/MySQl
for Windows on my laptop with xampp

Oct 19, 2009
Project Member #1 alfredarmstrong@gmail.com
The issue probably arises because of the special header required to tell Excel that
the CSV uses UTF-16 encoding, which is needed so we can export the full Unicode
character set.

It might be possible to save the file from Excel in some format that PHPmyAdmin will
accept, though I haven't experimented with that.
Jan 7, 2010
Project Member #2 alfredarmstrong@gmail.com
I've added an option for UTF-8 encoding, which you should be able to use with MySQL.
Please try it and let me know how it goes.
Feb 8, 2010
#3 john.g.h...@gmail.com
I'm still unable to get this working, but it is probably due to my lack of
experience. I'm still using the query/settings I mentioned with the utf-8 csv. Do
these settings look correct to you?  Have you tried this with phpmyadmin?

Thanks.
Feb 8, 2010
Project Member #4 alfredarmstrong@gmail.com
The enclosed by setting should be a " (double-quote) character. The terminated by
setting should be \t (meaning a tab). The escaped by character is \ (backslash). The
Line separator should be left as default. I don't have a phpmyadmin install handy
right now to test on, so let me know how it goes.

Powered by Google Project Hosting