getRow(' SELECT * FROM `'._DB_PREFIX_.'philea_sync` WHERE `status` = 0 ORDER BY `date_add` ASC ')) { // SEND ART01 Db::getInstance()->ExecuteS(' UPDATE `'._DB_PREFIX_.'philea_sync` SET `status` = 1 WHERE `id_sync` = '.(int) $row['id_sync'].' LIMIT 1 '); system('cd '.dirname(__FILE__).'/script && php send_article.php '.(int) $row['id_sale']); sleep(20); // SEND REC01 - pas de gestion recption fournisseur sur bbb /*Db::getInstance()->ExecuteS(' UPDATE `'._DB_PREFIX_.'philea_sync` SET `status` = 2 WHERE `id_sync` = '.(int) $row['id_sync'].' LIMIT 1 '); system('cd '.dirname(__FILE__).'/script && php send_recep_orderform.php '.(int) $row['id_sale']);*/ } if($row = Db::getInstance()->getRow(' SELECT * FROM `'._DB_PREFIX_.'philea_sync` WHERE `status` = 3 ORDER BY `date_add` ASC ')) { // SEND CDC02 Db::getInstance()->ExecuteS(' UPDATE `'._DB_PREFIX_.'philea_sync` SET `status` = 4 WHERE `id_sync` = '.(int) $row['id_sync'].' LIMIT 1 '); system('cd '.dirname(__FILE__).'/script && php send_commande.php '.(int) $row['id_sale']); }