public function handleDelete($id) { Model::delete($id, "authorId", "authors"); $array = dibi::query('SELECT workId FROM works WHERE author=%i', $id)->fetchAssoc(); foreach ($array as $val) { FileModel::deleteFiles($val['workId']); } Model::delete($id, "author", "works"); $this->redirect('this'); }
public function handleDelete($id) { Model::delete($id, "workId", "works"); FileModel::deleteFiles($id); $this->redirect('this'); }