Home > Archive > PHP Language > April 2007 > CSV to MySQL table (MyPHPAdmin)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
CSV to MySQL table (MyPHPAdmin)
|
|
| Joe Gazda 2007-04-09, 9:57 pm |
| I have a large data file (9 Meg) that I want to upload to a MySQL table. It
contains the key, model year, maker, model, and engine type for about the
past 50 years. The limitation of my MyPHPAdmin transfer is 2 Meg. So, I;m
looking for a simple PHP script to take 7 fiedls of data and transfer it to
an already existing (blank) MySQL table. I've done an Internet search and
the "free" code that I have found either lacks enough comments to work with
and just doesn't work at all.
I've seen programs that can be ourchased like from Sobolsoft, but don't have
any experience with the company. If it will work for this application, then
I'm willing to purchase it. If someone can lead me to a "functional",
commented script, al the better. But, if any one has successfully used any
commerical software and can lead me in the right direction, your input would
be greatly appreciated.
Joe G.
Dearborn, MI
| |
| ZeldorBlat 2007-04-09, 9:57 pm |
| On Apr 9, 11:20 am, "Joe Gazda" <e...@1on1cc.com> wrote:
> I have a large data file (9 Meg) that I want to upload to a MySQL table. It
> contains the key, model year, maker, model, and engine type for about the
> past 50 years. The limitation of my MyPHPAdmin transfer is 2 Meg. So, I;m
> looking for a simple PHP script to take 7 fiedls of data and transfer it to
> an already existing (blank) MySQL table. I've done an Internet search and
> the "free" code that I have found either lacks enough comments to work with
> and just doesn't work at all.
>
> I've seen programs that can be ourchased like from Sobolsoft, but don't have
> any experience with the company. If it will work for this application, then
> I'm willing to purchase it. If someone can lead me to a "functional",
> commented script, al the better. But, if any one has successfully used any
> commerical software and can lead me in the right direction, your input would
> be greatly appreciated.
>
> Joe G.
> Dearborn, MI
Why not just break the CSV file into 5 parts?
| |
| John Murtari 2007-04-09, 9:57 pm |
| "Joe Gazda" <email@1on1cc.com> writes:
> I have a large data file (9 Meg) that I want to upload to a MySQL table. It
> contains the key, model year, maker, model, and engine type for about the
> past 50 years. The limitation of my MyPHPAdmin transfer is 2 Meg. So, I;m
> looking for a simple PHP script to take 7 fiedls of data and transfer it to
> an already existing (blank) MySQL table. I've done an Internet search and
> the "free" code that I have found either lacks enough comments to work with
> and just doesn't work at all.
>
> I've seen programs that can be ourchased like from Sobolsoft, but don't have
> any experience with the company. If it will work for this application, then
> I'm willing to purchase it. If someone can lead me to a "functional",
> commented script, al the better. But, if any one has successfully used any
> commerical software and can lead me in the right direction, your input would
> be greatly appreciated.
I assume you know the 2 Meg limit is a configurable one? If you
have a hosting provider they may raise it for you temporarily. Another
simple option is just use the mysql command line client and load the
data that way, perhaps after ftp'ing your data to the server? There
is even other option since MySQL supports ODBC access, you can download
a special driver to your PC, put the data in uSoft Access, and then store
the table to your MySQL server.
Again, not sure of your exact setup, but one of these may help.
--
John
________________________________________
___________________________
John Murtari Software Workshop Inc.
jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM)
http://thebook.com/
| |
| Colin McKinnon 2007-04-09, 9:57 pm |
| Joe Gazda wrote:
> I have a large data file (9 Meg) that I want to upload to a MySQL table.
If you've got a 2Mb upload limit on HTTP, why not use FTP / SCP to upload it
to the server then use 'LOAD DATA INFILE....'
Or chop it up with 'split'
C.
| |
| Joe G. 2007-04-10, 6:57 pm |
| Thanks to all that replied, but I found the most helpful information in a
post from "Software Engineer". She directed me to a web site that offers
"detailed" solutions to PHP programming issues.
http://tutorial.fyicenter.com/824/M...PHP
.html
With a few modifications, I was able to use the code to load my data on to
the web MySQL server. The code works and there are detailed instructions
that I was able to paste into the code as comments (as all good programmers
should).
It seems that too many responses in newsgroups are just too terse. It really
doesn't help to reply with suggestions without leading them to more details
on the subject. Telling me to break apart the CSV file I suppose could be
considered a simple solution, but not the best. Without instructions or a
link on the best way to accomplish this, there really no sense in posting a
response. More than likely another person browsing the postings will think
that the question has been answered when seeing threads to the discussion.
I'm sure all people mean well, but people are coming to these newsgroups
looking for detailed solutions or at least to be pointed in the direction of
a solution.
"Joe Gazda" <email@1on1cc.com> wrote in message
news:oZKdnUNtYMARxIfbnZ2dnUVZ_s2vnZ2d@wi
deopenwest.com...
>I have a large data file (9 Meg) that I want to upload to a MySQL table. It
> contains the key, model year, maker, model, and engine type for about the
> past 50 years. The limitation of my MyPHPAdmin transfer is 2 Meg. So, I;m
> looking for a simple PHP script to take 7 fiedls of data and transfer it
> to
> an already existing (blank) MySQL table. I've done an Internet search and
> the "free" code that I have found either lacks enough comments to work
> with
> and just doesn't work at all.
>
> I've seen programs that can be ourchased like from Sobolsoft, but don't
> have
> any experience with the company. If it will work for this application,
> then
> I'm willing to purchase it. If someone can lead me to a "functional",
> commented script, al the better. But, if any one has successfully used any
> commerical software and can lead me in the right direction, your input
> would
> be greatly appreciated.
>
> Joe G.
> Dearborn, MI
>
>
|
|
|
|
|