A
Anonymous
Guest
Hello,
we have a PHP script that run in a infinite loop looking
on ORACLE DB (8.1.7). In each loop a SELECT is done, if this doesn't
return data then the SELECT is executed after two seconds. If after not
certain time the SELECT doesn't return data then when it returns data
the process is killed after OCIFetch(), view code for understand
better.
//START
//Set max execution time to infinite
set_time_limit(0);
$dbConnection = @OCILogon(USER_ID, PASSWORD, SID);
// infinite loop
$error=0;
do
{
$query="SELECT DATA FROM PROV";
$stmt = @OCIParse($dbConnection,$query);
@OCIDefineByName($stmt,"DATA",&$data);
@OCIExecute($stmt);
$err_ora = @OCIError($stmt);
if ($err_ora)
{
$error=1;
}
While (@OCIFetch($stmt) && ($error==0))
{
....
....
}
@OCIFreeStatement($stmt);
sleep(2);
}while ($error==0);
Thanks for any suggestion
we have a PHP script that run in a infinite loop looking
on ORACLE DB (8.1.7). In each loop a SELECT is done, if this doesn't
return data then the SELECT is executed after two seconds. If after not
certain time the SELECT doesn't return data then when it returns data
the process is killed after OCIFetch(), view code for understand
better.
//START
//Set max execution time to infinite
set_time_limit(0);
$dbConnection = @OCILogon(USER_ID, PASSWORD, SID);
// infinite loop
$error=0;
do
{
$query="SELECT DATA FROM PROV";
$stmt = @OCIParse($dbConnection,$query);
@OCIDefineByName($stmt,"DATA",&$data);
@OCIExecute($stmt);
$err_ora = @OCIError($stmt);
if ($err_ora)
{
$error=1;
}
While (@OCIFetch($stmt) && ($error==0))
{
....
....
}
@OCIFreeStatement($stmt);
sleep(2);
}while ($error==0);
Thanks for any suggestion