PHP
$SCode=$_POST['SCode'];
$ECode=$_POST['ECode'];
for($p=$SCode;$p<$ECode;$p++)
{
$dbResult= $dbHandle->query("
SELECT Code
FROM Mashaghel
Where Code=" . $p . "");
if(!isset($Mashaghel[0]["Code"]) || empty($Mashaghel[0]["Code"]))
{
$errorCode.=$p."،";
}
}
echo $errorCode."does not existed!";
i run this with
$_POST['SCode']='010100100101002084';
$_POST['ECode']='010100100101002087';
but this does not worked and say error Maximum execution time of 60 seconds exceeded While The difference between 010100100101002084 and 010100100101002087 only 3.
why for loop do infinite!?
please help me
Try this
for($p=0;$p<bcsub($ECode,$SCode);$p++)
{
$dbResult= $dbHandle->query("SELECT Code FROM Mashaghel
Where Code=" . bcadd($SCode,$p) . "");
if(!isset($Mashaghel[0]["Code"]) || empty($Mashaghel[0]["Code"]))
{
$errorCode.=bcadd($SCode,$p)."،";
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With