anchor.diff:  			var/datum/DBQuery/query_memodel = SSdbcore.NewQuery("DELETE FROM [format_table_name("memo")] WHERE ckey = '[target_sql_ckey]'")
   			if(!query_memodel.Execute())
   				var/err = query_memodel.ErrorMsg()
  +				qdel(query_memodel)
   				log_game("SQL ERROR removing memo. Error : \[[err]\]\n")
   				return
   			if(target_sql_ckey == sql_ckey)
  
positive.code: 				else
  					log_admin("[key_name(src)] has edited [target_sql_ckey]'s mentor memo from [old_memo] to [new_memo]")
  					message_admins("[key_name_admin(src)] has edited [target_sql_ckey]'s mentor memo from<br>[old_memo]<br>to<br>[new_memo]")
  		if("Show")
  			var/datum/DBQuery/query_memoshow = SSdbcore.NewQuery("SELECT ckey, memotext, timestamp, last_editor FROM [format_table_name("mentor_memo")]")
  			if(!query_memoshow.Execute())
  				var/err = query_memoshow.ErrorMsg()
  				log_game("SQL ERROR obtaining ckey, memotext, timestamp, last_editor from memo table. Error : \[[err]\]\n")
  				return
  			var/output = null
  
negative.code: 				var/datum/DBQuery/update_query = SSdbcore.NewQuery("UPDATE [format_table_name("mentor_memo")] SET memotext = '[new_memo]', last_editor = '[sql_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE ckey = '[target_sql_ckey]'")
  				if(!update_query.Execute())
  					var/err = update_query.ErrorMsg()
  					qdel(update_query)
  					log_game("SQL ERROR editing memo. Error : \[[err]\]\n")
  					return
  				if(target_sql_ckey == sql_ckey)
  