I make a jQuery Ajax call to a PHP script that runs for a decent amount of time (between 1- seconds and 3 minutes). It constantly logs a percentage of completion in a database. How can I continually run another Ajax request at the same to report the percentage complete from the MySQL database to the user?
EDIT
I understand how to use a separate PHP script to query the database, so my question is more how to set up the JavaScript and Ajax calls
After your AJAX call to kick off your process, you could make another AJAX call in a loop which requests, returns, and presents the current percentage complete until it reaches 100%. Basically, one AJAX call to initiate the process and then a series of calls which check status.
Update: Here is some simple JavaScript to achieve what you want: