I'm having a problem while doing a query in a MySql database. This query returns me a lot of data, and this data is sent to make a comparison inside a while
. Usually it is exceeding the time of my server ending the execution before doing all the comparisons.
I want to know if you have a technique for comparing all records without execution being interrupted?
Is it possible for a progress bar or a percentage to know how much has already been processed?
Below is part of the code I'm using for a better understanding.
while($row=ibase_fetch_object($result)){
$codigo = $row->CODIGO;
$saldo = $row->SALDO;
$mysqlquery = mysql_query("SELECT * FROM especificacoes_do_produto WHERE edp_interno LIKE '$codigo'");
if(mysql_num_rows($mysqlquery) != 0){
mysql_query("UPDATE especificacoes_do_produto SET edp_estoque = '$saldo' WHERE edp_interno='$codigo'");
$cad_texto = "Atualizado.....";
} else {
$cad_texto = "cadastrar";
}
}