• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

一个很简单的存储过程,大家帮小弟我看看错在哪里了

mysql 搞代码 7年前 (2018-05-31) 162次浏览 已收录 0个评论

一个很简单的存储过程,大家帮我看看错在哪里了
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行


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:一个很简单的存储过程,大家帮小弟我看看错在哪里了
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址