php - My code run in loop -


i know not kind of question can ask here code run in loop , don't know why :

   while ($resultat = $resultats->fetch())         {             $checkbadmetier = $connexion->prepare("select onetsoc_code                                 badquestionmetier                                 element_id = '$key' , onetsoc_code='$resultat->onetsoc_code'");             $checkbadmetier->execute(); //line 125!!             $res = $checkbadmetier->fetch(pdo::fetch_obj);             if (count($res) > 0) {                 $jobtable[$resultat->onetsoc_code]=-900000;             } 

it's make php timeout idea why?

fatal error: maximum execution time of 120 seconds exceeded on line 125

your loop might endless. if not, extend maximum execution time this:

ini_set('max_execution_time', 300); //300 seconds = 5 minutes 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -