|
There are a couple of problems with
putting that much data into an array. 1) you have to loop through 10-15,000 rows doing inserts 2) if one record is bad (ie contains a delimiter or such) your @array
tag will break You can trigger a MySQL import from
Witango. We used a .bat that did other thing, like backing up the db. Then did: c:\mysql\bin\mysql --user=xxxx --database=xxxx
<c:\sql\import.sql import.sql contained the SQL statements to
do the import, including load data infile 'c:\filepath.txt' into table import_table fields terminated by '|'; The file format is fairly flexible. Check
your mySQL reference docs. Dave -----Original
Message-----
Roland,
It
would be better to use the MySQL command LOAD DATA INFILE to import the data.
If
you need to massage the data, you can load it into a temporary table, process
it, then move it to your production table.
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf |
- Witango-Talk: best practice for uploading from file t... Roland Dumas
- Re: Witango-Talk: best practice for uploading fr... Dan Stein
- Re: Witango-Talk: best practice for uploadin... Roland Dumas
- Re: Witango-Talk: best practice for uploading fr... Roland Dumas
- RE: Witango-Talk: best practice for uploadin... Scott Cadillac
- RE: Witango-Talk: best practice for uploadin... Dave Shelley
- Re: Witango-Talk: best practice for uplo... Roland Dumas
- Re: Witango-Talk: best practice for ... Dave Shelley
- Re: Witango-Talk: best practice for uplo... Roland Dumas
- Witango-Talk: Variable Timeout solut... Tan Lim Soon Fu
- Re: Witango-Talk: Variable Time... Jonah Simpson
- Re: Witango-Talk: Variable Time... Anthony M. Humphreys
- Re: Witango-Talk: Variable ... Tan Lim Soon Fu
- RE: Witango-Talk: Varia... Scott Cadillac
- Re: Witango-Talk: best practice for uploadin... Roland Dumas
- RE: Witango-Talk: best practice for uploading fr... Storey, Paul
- Re: Witango-Talk: best practice for uploadin... Roland Dumas
- RE: Witango-Talk: best practice for uploading fr... Storey, Paul
