/* GET THE WORDING OF A MESSAGE (PROVIDED THE TARGET AND KEY) */
/* =============================================================================================================== */
DROP FUNCTION IF EXISTS GET_MESSAGE_WORDING;
COMMIT;

DELIMITER //

CREATE FUNCTION `GET_MESSAGE_WORDING`(`p_target` VARCHAR(75), `p_key` INT)
RETURNS VARCHAR(255)
BEGIN

  DECLARE iMiscValue VARCHAR(255);

  SELECT `value` 
  FROM `Messages`
  WHERE `target` = p_target
  AND `key` = p_key
  INTO iMiscValue;
	
	RETURN iMiscValue;

END 
//
COMMIT //

DELIMITER ;
