4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 UPLOAD FILE into MYSQL using phpMyadmin, file not read
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
nwaacc
Junior WebHelper
Junior WebHelper


Joined: 09 Jul 2004
Posts: 1
Location: USA

PostPosted: Fri Jul 09, 2004 11:55 pm (20 years, 5 months ago) Reply with QuoteBack to Top

Ok. I've set the upload directory in the config.ini file, i've exported an excel sheet as a .csv file and when I goto upload it, the response I receive is:

File could not be read /usr/local/apache/htdocs/******/*****/test.csv

Why is this happening? I am really new to this and trying to get a lot of data in my tables and really want this to work.

Any advice?

BTW-I am connecting to mySQL through my ISP who claims there are not restrictions on my account. I've had no problems setting up tables or inserting data thus far.
OfflineView User's ProfileFind all posts by nwaaccSend Personal MessageVisit Poster's WebsiteAOL Instant MessengerYahoo Messenger
FrankMac
Junior WebHelper
Junior WebHelper


Joined: 04 Aug 2004
Posts: 5

PostPosted: Sat Aug 07, 2004 10:03 am (20 years, 4 months ago) Reply with QuoteBack to Top

I had the same problem, it's something to do with the line breaks that Excel puts in. They are not compatible with MySql which interprets the file as one long line.
After much experimentation and no results I bought a converter from the place below. At $30, it's saved me from death by frustration.
http://www.convert-in.com/xls2sql.htm
I'm sure there are free ones out there, it's just I needed to get my stuff sorted out fairly quickly.
Cheers, Frank.
OfflineView User's ProfileFind all posts by FrankMacSend Personal Message
FrankMac
Junior WebHelper
Junior WebHelper


Joined: 04 Aug 2004
Posts: 5

PostPosted: Thu Aug 12, 2004 4:07 am (20 years, 4 months ago) Reply with QuoteBack to Top

Well I do feel a bit of a pillock, and $30 poorer.
I've now discovered I didn't need that program anyway.
I was trying to run an SQL Query, which may eventually have worked but was a very silly way of going about it.

The method below works and has already been explained by the moderators.
This is just in case anybody else is tempted to shell out $30 unnecessarily on the strength of my earlier post.

In phpMyAdmin:
1. Set up the table with the field names
2. Select the SQL tab
3. Click on <Insert data from a text file>
4. Browse to the location of the csv file
5. Change 'Fields terminated by' from <;> to <,>
6. Click <Submit>
7. Sorted! The data goes in no problem.
A classic case of 'Engage brain before opening mouth'. I shall be more careful in future.
OfflineView User's ProfileFind all posts by FrankMacSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.206754 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme