public function insertIntoIncident(Incident &$incident) { $description = $incident->getDescription(); $type = $incident->getType(); $adresse = $incident->getAdresse(); $severite = $incident->getReference(); $reference = $incident->getReference(); $target = $incident->getImgURI(); try { $count = $this->db->exec("INSERT INTO Mairie.Incident(Description, Type, Adresse, Severite, Reference, Image)\n VALUES ('{$description}',\n '{$type}',\n '{$adresse}',\n '{$severite}',\n '{$reference}',\n '{$target}');") or die(print_r($this->db->errorInfo(), true)); } catch (PDOException $e) { echo $e->getMessage(); } return "Nombre de lignes insérées : " . $count; }