public static function updateDetails(Details $details) { try { $pdo = Database::getInstance()->prepare('UPDATE details SET codeArticle=:codeArticle,libelleArticle=:libelleArticle,qteArticle=:qteArticle,montant=:montant,idCommande=:idCommande WHERE idDetail=:idDetail '); $pdo->bindValue(':idDetail', $details->getIdDetail()); $pdo->bindValue(':codeArticle', $details->getCodeArticle()); $pdo->bindValue(':libelleArticle', $details->getLibelleArticle()); $pdo->bindValue(':qteArticle', $details->getQteArticle()); $pdo->bindValue(':montant', $details->getMontant()); $pdo->bindValue(':idCommande', $details->getIdCommande()); $pdo->execute(); } catch (PDOException $e) { echo $e->getMessage(); } }