anchor.diff:  	if(!server)
   		if (config && config.server_name)
   			server = config.server_name
  +	server = sanitizeSQL(server)
   	var/DBQuery/query_noteadd = dbcon.NewQuery("INSERT INTO [format_table_name("notes")] (ckey, timestamp, notetext, adminckey, server) VALUES ('[target_sql_ckey]', '[timestamp]', '[notetext]', '[admin_sql_ckey]', '[server]')")
   	if(!query_noteadd.Execute())
   		var/err = query_noteadd.ErrorMsg()
  
positive.code: 		return
  	if(!note_id)
  		return
  	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]'")
  	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")
  
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)
  
  