mysqli - Blank error in mySql stored procedure -
i trying write simple login stored procedure in mysql simple testing purposes. stumped why errors out. here code:
create procedure prlogin (in userid varchar(20), in pw varchar(20)) begin select * userlogin inner join users on userlogin.id = users.userid userlogin.username = userid , userlogin.password = pw; end
as mentioned above, code fails, offers no clue why. can me? thanks! viv
the thing can find have not change delimiter, if don't change it, whole statement break @ last ;
happens on line a.password = pw;
.
delimiter $$ create procedure prlogin (in userid varchar(20), in pw varchar(20)) begin select a.*, b.* userlogin inner join users b on a.id = b.userid a.username = userid , a.password = pw; end $$ delimiter ;
by changing character of delimiter (anything want , chosen chars $$
), statement stop on new character , not on ;
.
Comments
Post a Comment