我越来越
错误代码:1305。FUNCTION acdb_extended.player 不存在
当我尝试调用存储过程时。该错误的奇怪之处在于“播放器”不是存储过程的名称。
这是存储过程代码,它可能有很多问题,但据我所知它是正确的:
CREATE PROCEDURE `acdb_extended`.`addAllianceMember` (IN accountNumber VARCHAR(255),
IN userName VARCHAR(255), IN serverInitial CHAR(1), IN galaxy TINYINT(2),
IN region TINYINT(2), IN system TINYINT(2), IN astro TINYINT(2), IN level TINYINT(2))
BEGIN
IF player (account_number) = accountNumber
THEN REPLACE INTO player (username)
VALUES (userName);
ELSE INSERT INTO player (account_number, username)
VALUES (accountNumber, userName);
END IF;
IF coordinates (server_initial) = serverInitial AND
coordinates (galaxy) = galaxy AND
coordinates (region) = region AND
coordinates (system) = system AND
coordinates (astro) = astro
THEN REPLACE INTO coordinates (player_ID)
VALUES ((SELECT player_ID FROM player WHERE username = userName));
ELSE INSERT INTO coordinates (player_ID, server_initial, galaxy, region, system, astro)
VALUES ((SELECT player_ID FROM player WHERE username = userName), serverInitial,
galaxy, region, system, astro);
END IF;
IF jumpgate (player_ID) = (SELECT player_ID FROM player WHERE username = userName) AND
jumpgate (coordinates_ID) = (SELECT c.coordinates_ID FROM coordinates c, player p WHERE c.player_ID = p.player_ID
AND p.username = userName)
THEN REPLACE INTO jumpgate (level)
VALUES (level);
ELSE INSERT INTO jumpgate (player_ID, coordinates_ID, level, usable)
VALUES ((SELECT player_ID FROM player WHERE username = userName),
(SELECT c.coordinates_ID FROM coordinates c, player p WHERE c.player_ID = p.player_ID
AND p.username = userName), level, TRUE);
END IF;
END
这是我用来测试它的 SQL 语句:
CALL addAllianceMember(8494618, 'Carl', 'G', 29, 08, 10, 01, 04);
关于哪里出错的任何提示?