存储过程在mysql5.1有返回但是在5.3或5.5无返回,怎么处理
1个回答
2016-07-13
展开全部
DROP FUNCTION IF EXISTS sp_login $$
CREATE FUNCTION sp_login( userID VARCHAR(20), passPwd VARCHAR(20)) RETURNS INT(1)
BEGIN
DECLARE flag INT default 5;
DECLARE B BOOLEAN;
SET B=1;
if b then
select count(*) into flag from Student where Student.StuID = userID and Student.StuPwd = passPwd;
if flag then
SELECT Authority into flag FROM Student where Student.StuID = userID and Student.StuPwd = passPwd;
CREATE FUNCTION sp_login( userID VARCHAR(20), passPwd VARCHAR(20)) RETURNS INT(1)
BEGIN
DECLARE flag INT default 5;
DECLARE B BOOLEAN;
SET B=1;
if b then
select count(*) into flag from Student where Student.StuID = userID and Student.StuPwd = passPwd;
if flag then
SELECT Authority into flag FROM Student where Student.StuID = userID and Student.StuPwd = passPwd;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询