Re: Progress bar?

From: Date: Fri, 08 Dec 2000 13:51:25 +0000
Subject: Re: Progress bar?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-29345@lists.php.net to get a copy of this message
Jay and others, SQL engines do not send a query status while they run a query, it defeats the whole object of Client Server. The idea has always been that you send a request to the server, it processes the results and it then sends the results back, keeping network traffic to a minimum. I have never seen any function on MySQL, MS SQL Server or PostgreSQL that allows you to send real time query status as they run a query. As I see it there are only 2 ways to do what you need. 1. Animated gif, that you disapprove of. or 2. Calculate an estimate to how long your query will take to run then have a JavaScript timer animate a status box. I really can't see any other way (sorry). The problem is that you can never acurately tell how long a query will take to execute especially on something as volatile as the Internet. Andy Woolley. www.databasewatch.com ----- Original Message ----- From: "Jason Lavigne" <jlavigne@stonecroft.net> To: "Andy Woolley" <andy@milonic.com>; "Miles Thompson" <milesthompson@sprint.ca>; <murph@murphatnight.com> Cc: <php-general@lists.php.net> Sent: Saturday, December 09, 2000 1:13 AM Subject: Re: [PHP] Progress bar? > Your progress bar is an animated gif and that was not what I was talking > about. I was describing how to make a real progress bar so if it said 80%, > it was 80%. This is not an easy thing to do but it can be done :) > > Jay > > ----- Original Message ----- > From: "Andy Woolley" <andy@milonic.com> > To: "Jason Lavigne" <jlavigne@stonecroft.net>; "Miles Thompson" > <milesthompson@sprint.ca>; <murph@murphatnight.com> > Cc: <php-general@lists.php.net> > Sent: Friday, December 08, 2000 8:03 AM > Subject: Re: [PHP] Progress bar? > > > > Guys, > > > > I think that this is being a little too complicated. > > > > In the past I used Layers, though not supported in NS6 and most > importantly > > the DOM, to display a portion of the page with an animated "scrolling bar" > > gif. > > > > ie. You need to split your page into two sections using <DIV>'s the first > > DIV displays as the second DIV loads. When the loading DIV has finished > > loading, you hide the first DIV and display the second DIV containing your > > search results. > > > > The combination of PHP, Javascript and DHTML make it work. > > > > Check out www.businessmeetings.com click on find a venue and search for > > "North America" to see this approach in action. Although this code uses > > layers that break quite dramaticaly under Netscape 6 it works well under > IE > > and NS4.x > > > > Regards. > > > > Andy Woolley > > www.databasewatch.com > > > > ----- Original Message ----- > > From: "Jason Lavigne" <jlavigne@stonecroft.net> > > To: "Miles Thompson" <milesthompson@sprint.ca>; > > <murph@murphatnight.com> > > Cc: <php-general@lists.php.net> > > Sent: Saturday, December 09, 2000 12:39 AM > > Subject: Re: [PHP] Progress bar? > > > > > > > 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 > > > > > > > > > > > > > -- > > > 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 > > > > > > > > > > > -- > 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 (#29345) next »