Jump to content

Loop


e1seix

Recommended Posts

I am trying to figure out the best way to do this. I have an update.php script that uses simplexml_load_file... and it keeps timing out, sometimes, other times not. At the beginning of the script I instruct to UPDATE mysql SET script_complete = "no" and at the end of the script a similar instruction to UPDATE to "yes".

 

If i'm using:

 

<?
include("update.php");
?>

 

... is there some way of putting a loop of some kind after the include that will check if the UPDATE in mysql has been changed to "yes" (ie. the script didn't time out) and if it still says "no", will run it again until it does, then move on.

 

On the occasions where it does time out when i run it manually, I find it usually completes on the third of fourth attempt.

 

<?
include("update.php");

... (loop?)
?>

Link to comment
https://forums.phpfreaks.com/topic/201675-loop/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.