On Sunday 05 January 2003 03:25, Micah Stevens wrote:
> I just wrote a script that goes through a database and does a lot of
> stuff to the data, it takes about 30 seconds to a minute to run through
> everything, so I thought it would be nice to show a progress indicator
> of some sort. What I have at this point, is that after every record is
> processed, I put in an:
>
> echo ".";
>
> command. I just noticed though, that nothing will get sent to the
> browser until the script is finished, so it's worthless to output the
> periods. Is there a way to get the browser to display partial data
> before it's done downloading the page (or before the script execution is
> done in this case..)?
>
> I'm not doing any output buffering, or sending headers or anything at
> this point, just SQL commands and echo output.
>
> Oh, I'm running php 4.2.2

Short answer: flush()

Longer answer: search the archives (both php-general & php-db), it's been 
covered many times before.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
static buildup
*/


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

Reply via email to