On May 14, 2004, at 1:08 PM, Dave Shelley wrote:

<x-tad-bigger>Roland,</x-tad-bigger>

<x-tad-bigger> </x-tad-bigger>

<x-tad-bigger>I wouldn’t recommend parsing the file into an array.
</x-tad-bigger>

how come?


<x-tad-bigger> It would be better to use the MySQL command LOAD DATA INFILE to import the data.
</x-tad-bigger>


Can I send the mysql command from witango?
What's the file format that the data would have to live in?


<x-tad-bigger>If you need to massage the data, you can load it into a temporary table, process it, then move it to your production table.</x-tad-bigger>

<x-tad-bigger> </x-tad-bigger>

<x-tad-bigger>I did this on a project recently. Importing >40K records, massaging the data, updating changed records, inserting new records and deleting old ones. It all ran in under a minute from a Witango cron job.</x-tad-bigger>

<x-tad-bigger> </x-tad-bigger>

<x-tad-bigger>You will also want to use a delimiter that does not appear anywhere in the data. A vertical bar is a good option.</x-tad-bigger>

for mucking with arrays yes. That's what I was trying to do that Scott made simple.


(Since I've not done an uploader before, I'm in search of a 'best practice' guide. If going via arrays is stupid or limiting, then it's nice to know not to go that route.)

Reply via email to