If you're using MySQL (and I'm sure several others) you can skip this whole step and
use mysqlimport. Run the command without arguments and it'll spit out some help. You
just tell it what the fields are terminated by and it'll split around them and
import into your db. Fast and easy.

Matt 


--- bc <[EMAIL PROTECTED]> wrote:
> i�have�some�csv�data:
>  
> ex:
>  
> 1,bart,555�3343�3456,main�st
> 2,john,398�775�3333,3rd�road
> 3......
> etc...�to�about�150�or�so
>  
> anyway,�i�want�to�use�perl�to�make�the�sql�statement:
>  
>
INSERT�into�$TABLE�(field1,�field2,�field3...)�VALUES�('value1','value2','value3'...);�
>  
> and�the�values�are�the�csv�data,�one�of�these�sentences�for�each�row
>  
> so�it�looks�like�i�want�to�put�
>  
> "�insert�into�tablename(id,�name,�phone...)�values('�"�,�$CSV_ROW_STRING,�"�);�"
>  
> and�i�have�a�cgi-bin�directory�i'm�gonna�use�for�this...��in�a�browser...��???
>  
> any�ideas?
>  
> the�csv�is�a�file�named�csv_rows.csv�
>  
> thanks,
> bc
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to