public function edit(Ad_facturation $ad_facturation)
 {
     $id = intval($ad_facturation->getId());
     $address = $this->database->quote($ad_facturation->getAddress());
     $postCode = $this->database->quote($ad_facturation->getPostCode());
     $city = $this->database->quote($ad_facturation->getCity());
     $complement = $this->database->quote($ad_facturation->getComplement());
     $query = "UPDATE ad_facturation\n\t\t\tSET address = '" . $address . "', post_code = '" . $postCode . "',\n\t\t\tcity = '" . $city . "', complement = '" . $complement . "'\n\t\t\tWHERE id = " . $id;
     $result = $this->database->exec($query);
     if ($result) {
         return true;
     } else {
         throw new Exception("Catastrophe base de données.");
     }
 }
 public function setAdFacturation(Ad_facturation $ad_facturation)
 {
     $this->ad_facturation = $ad_facturation;
     $this->id_ad_facturation = $ad_facturation->getId();
     return true;
 }