Re: fgets function for very large files

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

 



On Sat, 2009-05-23 at 10:41 +0430, shahrzad khorrami wrote:
> hi all,
> 
> I have a csv file with more than 100,000 lines. I want to insert each line
> as a record in a
> database. but for the reason of very number of lines,
> I put a button with caption Next,  when we click on it, 1000 line will
> insert into db and then again click next button
> and insert next 1000 line and....
>  is this good way? what do you recommend? and how can I do that?
> 
> 
> Thanks in advance,
> shahrzad

If it's a CSV, I'd recommend using phpMyAdmin directly to import it into
the database, assuming you are using a MySQL database that is. It's
using tried and tested code for large files like that.


Ash
www.ashleysheridan.co.uk


-- 
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