Reply to Re: Need help getting a script for huge inserts

Your name:

Reply:


Posted by john_ramsden on 12/06/05 09:51

Freebird wrote:
>
> Tks a lot, you're right, in here is better, but there's a problem, I can
> open the file, grab it all, and have all inside a array like this:
>
> $info[0][0] = 'row 1';
> $info[1][0] = 'row 2';
> $info[2][0] = 'row 3';
>
> But I've done a lot of tests, and can't get that running, how would I place
> my array inside this code ?

Assuming you mean you're uploading data from a client, I'd just write
that to a temp file with a unique name, with minimal processing, and
then rerun yourself supplying that file name as an argument so the
rerun can open the file and do the full processing.

(But note that on Unix I think temp files are deleted as soon as they
are opened, so that they are visible only to the process that created
them and they vanish when closed! So you may need to construct
a unique name by hand, e.g. epoch time and PID concatenated,
and open the temp file explicitly via fopen().)

The general idea is to do the minimum amount of work in the HTTP
stage to get yourself set up, and then do the time-consuming donkey
work in the asynchronous rerun.

[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

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