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: 		var/search
  		output += "<center><a href='?_src_=holder;addnoteempty=1'>\[Add Note\]</a></center>"
  		output += ruler
  		switch(index)
  			if(1)
  				search = "^."
  
negative.code: 	if(!linkless)
  		output = navbar
  	if(target_ckey)
  		var/target_sql_ckey = sanitizeSQL(target_ckey)
  		var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT id, timestamp, notetext, adminckey, last_editor, server FROM [format_table_name("notes")] WHERE ckey = '[target_sql_ckey]'")
  		if(!query_get_notes.Execute())
  			var/err = query_get_notes.ErrorMsg()
  			log_game("SQL ERROR obtaining ckey, notetext, adminckey, last_editor, server from notes table. Error : \[[err]\]\n")
  