25.02.2017, 05:09
Код:
Error
SQL query: Documentation
CREATE DEFINER=`root`@`localhost` PROCEDURE `login` (IN `username` VARCHAR(24), IN `password` VARCHAR(42), IN `ip` VARCHAR(45), OUT `returncode` VARCHAR(24)) BEGIN
DECLARE user_id INT;
DECLARE user_exist TINYINT;
DECLARE user_ban TINYINT;
DECLARE login_attempts INT;
DECLARE error_code INT;
SET user_id = -1;
SET error_code = 0;
SELECT
COUNT(*)
INTO user_exist
FROM players
WHERE name = username;
IF user_exist = 0 THEN
SET error_code = 10;
END IF;
IF error_code = 0 THEN
SELECT
COUNT(*)
INTO login_attempts
FROM pcp_login_attempt
WHERE (la_name = username
OR la_ip = ip)
AND la_error = 40
AND TIMESTAMPDIFF(MINUTE, la_time, NOW()) <= 10;
IF login_attempts >= 3 THEN
SET error_code = 20;
END IF;
END IF;
IF error_code = 0 THEN
SELECT
COUNT(*)
INTO use[...]
MySQL said: Documentation
#1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
Thank you in Advance

