function update() { if ($this->input->post('attachments')) { $this->attachments = serialize($this->input->post('attachments')); } else { $this->attachments = ''; } parent::update(); }