DELIMITER $$ DROP FUNCTION IF EXISTS `ladder`.`is_actkey`$$ CREATE DEFINER=`epswing`@`%.erin.utoronto.ca` FUNCTION `is_actkey`( in_actkey varchar(40) ) RETURNS tinyint(1) begin if exists (select id from player where actkey = in_actkey) then return true; else return false; end if; end$$ DELIMITER ;