Beispiel #1
0
 public function delete()
 {
     // delete citations
     $query = $this->_db->getQuery(true);
     $query->delete(' #__joaktree_citations ');
     $query->where(' objectType  = ' . $this->_db->quote('personNote') . ' ');
     $query->where(' objectOrderNumber = ' . $this->orderNumber . ' ');
     $query->where(' app_id      = ' . $this->app_id . ' ');
     $query->where(' person_id_1 = ' . $this->_db->quote($this->person_id) . ' ');
     $this->_db->setQuery($query);
     $result = $this->_db->query();
     // ready to delete
     $ret = parent::delete();
     return $ret;
 }
 public function delete()
 {
     // delete citations
     $query = $this->_db->getQuery(true);
     $query->delete(' #__joaktree_citations ');
     $query->where(' objectType  = ' . $this->_db->quote('relationEvent') . ' ');
     $query->where(' objectOrderNumber = ' . $this->orderNumber . ' ');
     $query->where(' app_id      = ' . $this->app_id . ' ');
     $query->where(' person_id_1 IN (' . $this->_db->quote($this->person_id_1) . ', ' . $this->_db->quote($this->person_id_2) . ') ');
     $query->where(' person_id_2 IN (' . $this->_db->quote($this->person_id_1) . ', ' . $this->_db->quote($this->person_id_2) . ') ');
     $this->_db->setQuery($query);
     $result = $this->_db->query();
     // deletenotes
     $query->clear();
     $query->delete(' #__joaktree_relation_notes  ');
     $query->where(' app_id     = ' . $this->app_id . ' ');
     $query->where(' eventOrderNumber  = ' . $this->orderNumber . ' ');
     $query->where(' person_id_1 IN (' . $this->_db->quote($this->person_id_1) . ', ' . $this->_db->quote($this->person_id_2) . ') ');
     $query->where(' person_id_2 IN (' . $this->_db->quote($this->person_id_1) . ', ' . $this->_db->quote($this->person_id_2) . ') ');
     $this->_db->setQuery($query);
     $result = $this->_db->query();
     // ready to delete
     $ret = parent::delete();
     return $ret;
 }