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.
Dynamic update Status bar with sql query status
Collapse
X
-
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).Comment
Comment