function delete()
 {
     if (!$this->canBeDeleted()) {
         trigger_error("This note can not be deleted");
         return FALSE;
     }
     if (!parent::delete()) {
         return FALSE;
     }
     $db =& $GLOBALS['db'];
     $sql = 'DELETE FROM note_comment WHERE noteid = ' . $db->quote($this->id);
     $res = $db->query($sql);
     check_db_result($res);
     return TRUE;
 }