Gareth, PHP has a default 30 second timeout. This can be changed in php.ini (not reccomended) or by set_time_limit (http://www.php.net/manual/en/function.set-time-limit.php). Set it to "0" to disable the timout script.
-Dash "I think the sky is blue because it's a shift from black through purple to blue, and it has to do with where the light is. You know, the farther we get into darkness, and there's a shifting of color of light into the blueness, and I think as you go farther and farther away from the reflected light we have from the sun or the light that's bouncing off this earth, uh, the darker it gets ... I think if you look at the color scale, you start at black, move it through purple, move it on out, it's the shifting of color. We mentioned before about the stars singing, and that's one of the effects of the shifting of colors." -- Pat Robertson, The 700 Club On Wed, 20 Nov 2002, Gareth Thomas wrote: > Hi, > > I am trying to write some code to sit and wait for an entry in a table, once an >entry is made it is processed and then the waiting loop begins again. Problem is that >after a period of time the code just stops, almost like a timeout with no error >message or any indication of why. This is the code: > > echo('Waiting for command \n'); > do { > $result = mysql_query("SELECT * FROM command_queue LIMIT 1"); > $rows = mysql_num_rows($result); > } > while ($rows == 0); > > My PHP version is 4.2.3. Does anyone have any idea why this is occurring? Is there >maybe a better way of doing this? > > Any help will be much appreciated. > > Gareth > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php