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