anchor.diff:  		return
   	if(!note_id)
   		return
  +	note_id = text2num(note_id)
   	var/target_ckey
   	var/sql_ckey = sanitizeSQL(usr.ckey)
  -	var/DBQuery/query_find_note_edit = dbcon.NewQuery("SELECT ckey, notetext, adminckey FROM [format_table_name("notes")] WHERE id = '[note_id]'")
  +	var/DBQuery/query_find_note_edit = dbcon.NewQuery("SELECT ckey, notetext, adminckey FROM [format_table_name("notes")] WHERE id = [note_id]")
   	if(!query_find_note_edit.Execute())
   		var/err = query_find_note_edit.ErrorMsg()
   		log_game("SQL ERROR obtaining notetext from notes table. Error : \[[err]\]\n")
  
positive.code: 		ckey = query_find_note_del.item[1]
  		notetext = query_find_note_del.item[2]
  		adminckey = query_find_note_del.item[3]
  	var/DBQuery/query_del_note = dbcon.NewQuery("DELETE FROM [format_table_name("notes")] WHERE id = '[note_id]'")
  	if(!query_del_note.Execute())
  		var/err = query_del_note.ErrorMsg()
  		log_game("SQL ERROR removing note from table. Error : \[[err]\]\n")
  
negative.code: 			timestamp = query_convert_time.item[1]
  		if(ckey && notetext && timestamp && adminckey && server)
  			add_note(ckey, notetext, timestamp, adminckey, 0, server)
  	notesfile.cd = "/"
  	notesfile.dir.Remove(ckey)
  
  