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