User feedback after MySQL query has been executed

Posted on 16th Feb 2014 07:03 pm by admin

Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out by myself.

Im developing a web based reporting application, based upon PHP/MySQL. At some point the user can chose some parameters from a form like dates etc and hit a button, then the form data is submitted to execute_report.php, which contains some code as follos:

Code: <html>
Some html stuff here, like text output for the user, that the query xyz has been started

Here goes the first query

Then html code again to insert a line that the query has finished

Another line of text that the next query has started

And the next MySQL query

Text again that the query has finished ... and so on

Basically everything works like a charm. The queries do what I want and deliver the output and results just fine. What bugs me is, that all results and the html text output are only displayed after the last query has finished.

During the whole executing time, the browser just says "Loading" until the queries have executed, then all results are displayed the way I intended them to.

I already tried experimenting with putting the queries into functions and also with sleep commands, but to no avail.

I would love to give the user a feedback before a query starts and after it has finished, sort of in "Real time". Any tips would be greatly appreciated

No comments posted yet

Your Answer:

Login to answer
216 Like 50 Dislike
Previous forums Next forums
Other forums

How could I do this?
Ive got a simple lottery game, and am using an sql database to keep track of the numbers bought. But

simple php table loop
Hi all,

I've the following code

<?php // Create category options

Business Health Check

I need to create an online business health check for a client it will be multiple choi

Warning: session_start() headers already sent error - Driving me Nuts!
I am trying my sister in laws site and I keep getting an error with my coding. I am more of a design

Was wondering if someone could explain this a little better to me. I had always assumed that it had

IS Retail & Manufacturing

Can IS Retail and Manufacturing activities be done in same instance ie. in same client

php mysql script to find record

Currently I have a simple table with 4 columns. A, B, C, D

If I want to find all

server trace logs
could any one tell me from where do i get error logs in xMII??I want to check the reason for dtabase

Help on query replacing the date
Hi Pals,

i want to replace the current date in a column to some value say C or D or any n

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS

Play Free Quiz and Win Cash