public function add(Modele $mod) { if ($mod->getAddable()) { $q = $this->_db->prepare("INSERT INTO modele SET nomModele=:modele, idMarque=:idM, qteStock=:stock, prix=:prixL, tauxRemise=:taux"); $q->execute(array(":modele" => $mod->getNomModele(), ":idM" => $mod->getIdMarque(), ":stock" => $mod->getQteStock(), ":prixL" => $mod->getPrix(), ":taux" => $mod->getTauxRemise())); echo "add"; } else { echo "conditions non validées voir trigger_error"; } }