/**
  * delete all existing attachments from database for given record id
  * @param $record_id int unique identifier of a ListTable object
  * @return bool indicates if ListTableAttachment has been deleted
  */
 function delete_record_attachments($record_id)
 {
     $this->_log->trace("deleting ListTableAttachments (record_id={$record_id})");
     # create encoded_key_string
     $encoded_key_string = parent::_encode_key_string(LISTTABLEATTACHMENT_RECORD_ID_FIELD_NAME . "='{$record_id}'");
     if (parent::delete($encoded_key_string) == FALSE) {
         return FALSE;
     }
     $this->_log->trace("deleted ListTableAttachments");
     return TRUE;
 }
Ejemplo n.º 2
0
 /**
  * delete all existing notes from database for given field name
  * @param $field_name string field name
  * @return bool indicates if ListTableNote has been deleted
  */
 function delete_field_notes($field_name)
 {
     $this->_log->trace("deleting ListTableNotes (field_name={$field_name})");
     # create encoded_key_string
     $encoded_key_string = parent::_encode_key_string(LISTTABLENOTE_FIELD_NAME_FIELD_NAME . "='{$field_name}'");
     if (parent::delete($encoded_key_string) == FALSE) {
         return FALSE;
     }
     $this->_log->trace("deleted ListTableNotes");
     return TRUE;
 }