Reply to Re: Stream from FTP directly to MySQL while parsing CSV

Your name:

Reply:


Posted by Chung Leong on 10/06/09 11:38

Eric Anderson wrote:
> d wrote:
> > As chung was hinting at, use the FTP wrapper by simply opening the file with
> > fopen() as you would a local file. You can then use fgets() to read a
> > single line at a time, process that line, and repeat until the file has been
> > read in its entirity.
>
> I thought about that but I am also reading a large number of file from
> the FTP server into the database and my assumption is that if I use
> fopen it will login to the FTP server everytime vs just once adding to
> the overhead a good bit.
>
> Thanks for the suggestion though. I'll keep it in mind.
>
> Eric

Good point. On the other, the file transfer would happen concurrently
with the database inserts. If the file is large, the time required
would be lower for the entire operation.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация