[ic] Import Products with MySQL

Rick interchange-users@icdevgroup.org
Wed Aug 14 15:37:10 2002


Caleb Phillips wrote:

> On Tue, 2002-08-13 at 20:50, Andrew Rich wrote:
> 
>>Hi All
>>
>>We have IC 4.8.5 (will be 4.8.6 soon!!)
>>Using Foundation type site with MySQL
>>Red Hat 7.3
>>
>>Our product range of over 2000 items has all been hand entered over many
>>late nights.
>>
>>We have a few supplier product lists on CD and I can manipulate structure
>>easily so what is the best way to import these.  About another 2000
>>products.
>>
>>I need to know the easiest or best way to import without loosing current
>>catalog.  If it requires appending to products.txt and doing something with
>>that is fine.
>>
>>So question is how do I do it?
>>
> 
> One route that hasn't been mentioned is writing a perl script to import
> the data with DBI. I had to build my database of about 245 products, and
> that is how I did it. The benefit of this is that, if you write it
> correctly, you can run it on a cron-job to keep the DB updated from your
> working file.  If you want some help using the perl DBI to do this, just
> ask.
> 
> 
>>Regards
>>_______________________________________
>>Andrew Rich
>>Maps Downunder
>>Ph: +61 3 9748 0422 Fax: +61 3 9748 0422
>><mailto:andrew@mapsdownunder.com.au>
>><http://www.mapsdownunder.com.au>
>>
>>

What I did was to write perl scripts to take a more user friendly 
spreadsheet and convert that to the appropriate .txt files. Converting 
the .txt files to .sql is trivial. This, of course, assumes sql. Now, 
all my customers have to do is update their spreadsheet and it takes me 
15 minutes to enter all their products no matter how vast the changes.

-Rick
rick@epitomedesign.com