I'm sorry, I should have been more specific on  this.

It's PHP5 and the input is a text file from a data logger which means that
I have to find the data records then decompose each into the individual
data elements to insert into the database, so it's not just a case of a
simple .SQL file as input.

The process is:
Read a line from the file.
Decompose the line into the data elements.
For each data element, do a select on the database to see whether it
already exists, if not then do an insert into the database.
Rinse and repeat...

It certainly has the smell of being a PHP memory leak, but how I can work
around it I am just not sure.


On Tue, April 29, 2008 15:45, Howard Lowndes wrote:
> I have a need to output a progress counter from a PHP script that takes a
> while to run whilst writing a large number of records out to an SQL
> database, mainly so that the user knows that things are still happening
> and not hung.
>
> It seems a simple thing to do, but when I try it, the progress counter
> (say, every 100 records) instead of being output at the correct time, gets
> delayed until the whole process has finished.
>
> What is the best way to get around this problem.
>
>
> --
> Howard
> LANNet Computing Associates <http://lannet.com.au>
> When you want a computer system that works, just choose Linux;
> When you want a computer system that works, just, choose Microsoft.
>
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>
>


-- 
Howard
LANNet Computing Associates <http://lannet.com.au>
When you want a computer system that works, just choose Linux;
When you want a computer system that works, just, choose Microsoft.

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to