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:

Did you know?Explore Trending and Topic pages for more stories like this.
Code: <html>
Some html stuff here, like text output for the user, that the query xyz has been started

<?php
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

<?php
And the next MySQL query
?>

Text again that the query has finished ... and so on
</html>

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

read integers that returns a negative or prints the average
Im trying to finish this homework assignment by tommarow afternoon and I keep getting stuck.
Wr

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

Reduce redundancies in switch functions?
Hello all! I somewhat new to PHP, and was wondering if anyone could give some suggestions on a swit

Passing PHP variables from one page to another
Hello-

I'm having trouble figuring out how to transport a variable from one php file to anoth

Get relative path from absolute path
How would one go about getting the relative path to a file from its absolute path?

browse folder only
hi,
is there a way i can browse or get the directory or folder only and not the file?
i just w

How to display objects in a row
I have 7 codes that i want to display in a row one next to another.
The first is {$ads->ad

PHP page is blank
Hi Everyone,

I have a site in which I am able to open the first PHP webpage in my browser but

Checking if multidimensional array is empty?
I have a for with multiple test input fields. Specifically the user submits multiple names and ages

Email Processor
I have a few questions so this post will be a larger one! Sorry, but I'm a bit of a PHP newbie so be

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