fxGetResults($sqlPaniers); if ($tabPaniers != null) { for ($intCtr = 1; $intCtr <= count($tabPaniers); $intCtr++) { fxViderPanier($tabPaniers[$intCtr]['no_panier'], 1); } } */ // POST MSIN-194 $sqlPaniers = "UPDATE inscriptions_panier_acheteurs SET sta_id = 2 WHERE sta_id = 1 AND ach_maj <= DATE_SUB('" . fxGetDateTime() . "', INTERVAL 6 HOUR)"; $tabPaniers = $objDatabase->fxQuery($sqlPaniers); // trouver les campings des paniers incomplets ajout�s depuis plus de 30 min $sqlPaniers = "SELECT p.ppn_id, a.no_panier FROM inscriptions_panier_acheteurs a, inscriptions_panier_produits_new p WHERE a.no_panier = p.no_panier AND a.sta_id = 1 AND p.pt_id = 1 AND a.ach_maj <= DATE_SUB('" . fxGetDateTime() . "', INTERVAL 30 MINUTE) AND p.pro_maj <= DATE_SUB('" . fxGetDateTime() . "', INTERVAL 30 MINUTE) ORDER BY a.ach_maj DESC"; $tabPaniers = $objDatabase->fxGetResults($sqlPaniers); if ($tabPaniers != null) { for ($intCtr = 1; $intCtr <= count($tabPaniers); $intCtr++) { $sqlDelete = "DELETE FROM inscriptions_panier_produits_new WHERE ppn_id = " . intval($tabPaniers[$intCtr]['ppn_id']) . " AND no_panier = '" . $tabPaniers[$intCtr]['no_panier'] . "'"; $qryDelete = $objDatabase->fxQuery($sqlDelete); } } fxcreer_log('Cron job pour vider les paniers');