Dynamic update Status bar with sql query status

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suddu
    New Member
    • Sep 2008
    • 3

    Dynamic update Status bar with sql query status

    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.
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    I've never seen this done before; nor have I seen an effective pure PHP/JS progress bar.

    Would like to see otherwise, though.

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      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

      Working...