Beispiel #1
0
 /**
  * 删除记录
  *
  * @param array $filter 条件
  * @return int 返回影响行数
  */
 public function delete(array $filter)
 {
     $sql = "DELETE FROM {$this->tableName} ";
     if (!empty($filter)) {
         $sql .= " WHERE " . $this->parseFilter($filter);
     }
     return $this->db->delete($sql);
 }
Beispiel #2
0
 public function delete()
 {
     if (is_dir($this->getPath())) {
         \Phpfox_File::instance()->delete_directory($this->getPath());
     }
     foreach ($this->flavors() as $Flavor) {
         $Flavor->delete();
     }
     $this->_db->delete(':theme', ['theme_id' => $this->theme_id]);
     return;
 }