23.02.2016, 10:30
any Solution About This Error
PHP код:
Error
SQL query:
CREATE DEFINER=`bondowocopz`@`localhost` FUNCTION `time_function`(`ATIME` DATETIME) RETURNS varchar(100) CHARSET latin1
BEGIN
DECLARE INF VARCHAR(100);
DECLARE NWT VARCHAR(100);
DECLARE TAG TINYINT;
SET TAG = 0;
SET INF = DATE_FORMAT(ATIME, "%Y%m%d%H%i%s");
SET NWT = DATE_FORMAT(NOW(), "%Y%m%d%H%i%s");
IF (INF = NWT) THEN
SET INF = 'Just a moment';
SET TAG = 1;
END IF;
IF (SUBSTR(INF, 1, 12) = SUBSTR(NWT, 1, 12)) AND (TAG = 0) THEN
SET INF = CONCAT(SUBSTR(NWT, 13, 2) - SUBSTR(INF, 13, 2), ' seconds ago');
SET TAG = 1;
END IF;
IF (SUBSTR(INF, 1, 10) = SUBSTR(NWT, 1, 10)) AND (TAG = 0) THEN
SET INF = CONCAT(SUBSTR(NWT, 11, 2) - SUBSTR(INF, 11, 2), ' minutes ago');
SET TAG = 1;
END IF;
IF (SUBSTR(INF, 1, 8) = SUBSTR(NWT, 1, 8)) AND (TAG = 0) THEN
SET INF = CONCAT(SUBSTR(NWT, 9, 2) - SUBSTR(INF, 9, 2), ' hours ago');
SET TAG = 1;
END IF;
IF[...]
MySQL said: Documentation
#1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation