Re: Progress bar?

From: Date: Fri, 08 Dec 2000 13:26:13 +0000
Subject: Re: Progress bar?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-29341@lists.php.net to get a copy of this message
Jason, Very impressive - but what SQL engines provide a count of records as they process? Or is that a part of the MySQL / PostgreSQL docs I haven't uncovered yet? I do believe, with all the Javascript and DHTML it would be an ongoing maintenance headache. I'm also curious about the original poster's query, which apparently takes so long to run. Full join on a big table? Miles Jason Lavigne wrote: > If you were to use a streaming HTML window from PHP ( as seen in PHPChat on > http://www.phpwizard.com ) you can keep sending data to the > browser without > reposting ( read about flush() ) to the server. So if you did this you could > do the following in PHP: > > Do select from SQL and return Num of rows (use a function that counts the > total number of records from the select) and send that to the browser. > As you process each record you could send back to the browser that you > processed X records. (I would send this update after 10 records or add code > that after each % that was done I send back that number) > At this time the browser has the total number of records and is receiving > the record number that was processed (10 out of 100 etc...) > Then using JavaScript you could feed those values in to DHTML or Flash to > graphically do a status bar. > > Is there another solution? I am sure there is, but it is not impossible. > > Let me know if you do do this, I would be interested is seeing in working :) > > Jay > > ----- Original Message ----- > From: "Miles Thompson" <milesthompson@sprint.ca> > To: "Murph" <murph@murphatnight.com>; "PHP General List" > <php-general@lists.php.net> > Sent: Friday, December 08, 2000 7:25 AM > Subject: Re: [PHP] Progress bar? > > > If you did one you'd have to fake it. Think about it, the web is stateless > environment, no channel is opened and maintained to the back end, and SQL > queries are essentially the same. If a progress bar > > displays while a SQL query executes, it's provided by the database vendor. > > > > If you did have feedback from the SQL engine you would need to keep firing > new pages to the browser. > > > > Regards - Miles Thompson > > > > Murph wrote: > > > > > Hi! > > > > > > Has anyone invented a progress bar that displays on a web page to > entertain the viewer while they wait for a query to finish? I'd be > interested in getting a pointer to a snippet of code if you have it. > > > > > > Yours, > > > Murph > > > > > > www.murphatnight.com > > > __________________________________________________________________ > > > Brian Murphy - 193A Lowell St., Apt. 24 - Methuen, MA 01844 - (978) > 725-6654 > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#29341) next »