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

Please Help my PHP Dating Function.
Hi everyone!

Well here is my code that displays this:

It works wonderful.


Send inserts to mysql thru port 80
Hi!

I have an application that must do some inserts in a mysql db. This db is behind a firewa

max() problem
I have a while loop to get image names.
Code: $imagequery = mysql_query("SELECT * FROM ad_i

PL/SQL: ORA-00947: not enough values error message
Hi all i am getting Error(25,63): PL/SQL: ORA-00947: not enough values error message when executing

Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming

Need help Updating SQL Server Express DB from c# :(
Please can anyone help with:-
1 How to sructure the strSelect statement.
2 How to instruct

How to assign JS screen.width to ASP.Net variable
I've got this ASP.net routine that gets the cookie value of the screen width, but now I need to chan

SAP Logon Failed
I tried to login to SAP through MMC.

When i click start and give password.

it

Auto fill in input value based on User_ID
Hello,

I'm looking form some input on the following problem.

User loads page ->

Breaking results into week blocks
I have a set of dates (and times), which are returned from a mySQL query.

These usually span

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