Exemplo n.º 1
0
 /**
  * Deletes a invoice and all
  * the associated items.
  *
  * @return bool
  */
 public function delete()
 {
     // Delete the items
     $this->item()->delete();
     // Delete the invoice
     return parent::delete();
 }
Exemplo n.º 2
0
 public function delete($id)
 {
     $success = false;
     // retrieve a connection
     $conn = $this->getConnection();
     // first of all delete related events
     $eventmodel = unserialize($_SESSION['eventmodel']);
     $table = $eventmodel->getTable();
     $query = "DELETE FROM " . $table . " WHERE activation_id=" . $id;
     $result = $conn->query($query);
     // if succeeded, delete row in superclass
     if ($result) {
         $success = parent::delete($id);
     }
     return $success;
 }