By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,612 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

Dynamic update Status bar with sql query status

P: 3
I am running a mysql query thru php that takes long time to execute. I want to see which field is getting updated on the status bar dynamically. Progress bar will not help. In foxpro i used to used wait window.
Sep 6 '08 #1
Share this Question
Share on Google+
2 Replies


Markus
Expert 5K+
P: 6,050
I've never seen this done before; nor have I seen an effective pure PHP/JS progress bar.

Would like to see otherwise, though.
Sep 6 '08 #2

pbmods
Expert 5K+
P: 5,821
Heya, Suddu.

PHP is not threaded, so you wouldn't have any way of pinging the MySQL server while the query was running, and at any rate, MySQL provides no interface to determine query "status" other than "completed" and "not completed".

One solution (that smacks of the Mac OS 10.4 startup progress bar [http://daringfireball.net/misc/2005/...forloginwindow]) is to record your query times and report the average for the query the User has executed so that the User knows about how long it will take.

If you have a lot of queries that generally take a long time to execute, you might consider setting up a job queue instead. Then you can schedule the job and redirect to a page that pings the server every few seconds to see if the job has completed.

If you have Zend Platform installed, then you can interface with their built-in job queue (http://devzone.zend.com/article/2207...orms-Job-Queue).
Sep 7 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.