一个很简单的存储过程,大家帮我看看错在哪里了
create PROCEDURE lczUpdateMyFriends(
$MyId MEDIUMINT,
$MyFriendId MEDIUMINT,
$GroupName VARCHAR(200),
$OType VARCHAR(200)/*add--add friend, DEL-delete friend,move-move to another group*/
)
BEGIN
IF ($OType= 'add ') then
BEGIN
insert t_friendlist VALUES($MyId,$MyFriendId,$GroupName);
END;
ELSE
BEGIN
IF ($OType= 'del ') then
BEGIN
delete from t_friendlist where f_id=$MyId and iadd=$MyFriendId;
END;
ELSE
BEGIN
IF ($OType= 'mov ') then
update t_friendlist set groupName=$groupName where f_id=$MyId and iadd=$MyFriendId;
End if;
END;
END IF;
END;
END /////26行
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' ' at line 26
------解决方案--------------------26行加上分隔符
比如END$$ /////26行