大佬
错误
SQL 查询: 文档
DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `addBet`(_uid int, _amount float, _username varchar(16) character set utf8) begin declare parentId1 int; -- 上级ID declare parentId2 int; -- 上上级ID declare pname varchar(16) character set utf8; -- 上级用户名 declare CommissionBase float(10,2); -- 佣金目标 declare CommissionParentAmount float(10,2); -- 上级金额 declare CommissionParentAmount2 float(10,2); -- 上上级金额 declare cur Decimal(12,4); declare _commisioned tinyint(1); select bet into cur from ssc_member_bet where uid=_uid and date=date_format(now(),'%Y%m%d'); if cur is null THEN INSERT into ssc_member_bet(uid, username, date, bet, commisioned) values(_uid, _username, date_format(now(),'%Y%m%d'), _amount, 0); end if; if cur is not null THEN update ssc_member_bet set bet=bet+_amount where uid=_uid and date=date_format(now(),'%Y%m%d'); end if; select bet in[...]
MySQL 返回: 文档
#1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
这个肿么办啊~~ |