By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,269 Members | 1,507 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,269 IT Pros & Developers. It's quick & easy.

How do I force a refresh after a header() call? How do I force a refresh after a header() call? How do I force a refresh after a header() call? How do I force a refresh after a header() call? How do I force a refresh after a header() call?How do

P: n/a
I've got a main loop script that calls two other scripts that do no
user interaction. All they do is send a couple of mysql update
statements. Then they use header() to call the main loop again. This
works fine, EXCEPT the mysql statement isn't finished by the time the
main loop is called. This is a problem because the main loop actually
queries that same table to show the value of the rows you just
changed. If I refresh the page manually, the new value is correctly
displayed.

I need to either be able to refresh the page upon calling it, or
better yet, have a conditional statement in the subroutines that wait
for the mysql statement to complete (how do you do that?).

Any help is appreciated.

Charles
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Charles Soto <ch*****@gtemail.net> wrote:
I've got a main loop script that calls two other scripts that do no
user interaction. All they do is send a couple of mysql update
statements. Then they use header() to call the main loop again. This
works fine, EXCEPT the mysql statement isn't finished by the time the
main loop is called. This is a problem because the main loop actually
queries that same table to show the value of the rows you just
changed. If I refresh the page manually, the new value is correctly
displayed.

I need to either be able to refresh the page upon calling it, or
better yet, have a conditional statement in the subroutines that wait
for the mysql statement to complete (how do you do that?).


could you not just put the mysql statements in a function, then call that
function from your "main loop" (some code could clarify your problem)? if
desired, put the function in a separate file and include the file before
calling the function. your main loop will then wait for the function to
finish up, and carry on if it's finished.

regards,
steven.
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.