public function delete($id) { $sheet_id = $this->available($id); $res = $this->deleteByField(array('id' => $id, 'sheet_id' => $sheet_id)); $sheet = new stickiesSheetModel(); $sheet->refresh($sheet_id, $this->countByField('sheet_id', $sheet_id)); return $res; }