Beispiel #1
0
 public function deleteCarousel($id)
 {
     unlink(Carousel::showImageCarousel($id));
     $sql = 'DELETE FROM carousels WHERE carousel_id = :id';
     $this->carousels = parent::connect()->prepare($sql);
     $data = array('id' => $id);
     try {
         $this->carousels->execute($data);
     } catch (PDOException $e) {
         die($e->getMessage());
     }
 }