BEGIN
DECLARE countj INT; -- 临时存储重复UID总数
DECLARE i INT; -- 临时循环变量存储
DECLARE days INT;
DECLARE game varchar(50);
SET i=1;
SELECT count(DISTINCT(days)) INTO countj FROM `count_serverinfo` WHERE gameid = '",game,"';
SELECT days INTO days FROM `count_serverinfo` WHERE gameid = '",game,"' GROUP BY days asc ;
WHILE i <= countj DO
BEGIN
SELECT game,serverorder,serverid,MAX(IF(days='",days,"',amountcount,0.00)) AS '",days,"' FROM count_serverinfo GROUP BY serverid ORDER BY serverorder DESC;
END;
SET i = i +1;
END WHILE;
END
我应该怎么在
php文件中调用勒?上网查了一下,用网上的调用方法但是不成功,第一次弄存储过程,求指教,我感觉我写的存储过程也有问题,我该怎么办??