RE: Very Large text file parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Scott wrote:

> Code:
> [SNIP]
> $row = 1;
> $handle = fopen($csvfile, "r");
> while (($data = fgetcsv($handle, 1000, "\t")) !== FALSE) {
>      $num = count($data);
>      $row++;
>      $insarr = array('userid' => $userid,
>                     'geonameid' => $data[0],
[snip]
>          $this->objDbGeo->insertRecord($insarr);
>     //$arr[] = $data;
> }
> fclose($handle);

For that sort of thing, I'd forget about PHP and just use multi-threaded
C.  Especially if you've got an SMP machine.


/Per Jessen, Zürich

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux