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

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

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

passing data from one page to another
hey guys
i have the follwoing code to get information from one page and place on another:

Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment

present value of sequence?
Hi

Please help me to find out the present value of sequence?

Thanks

DELETE FROM not working deletes wrong row
Hello

I have the following code which i found but it doesnt work properly.. it comes up with

Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database ass

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

Strange php code found on my website
I got hacked and the following code was placed within my files:

Code: [Select]<?
/*

mysql UNION | warning mysql_fetch_array !!
Code: <?php
$i = 0;
$query1="SELECT * FROM `products` WHERE `div

adding 0 to numbers
Hey guys i need to create a 00001 number in a loop. Is there a better way of forcing a 5 digit numbe

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