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
$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
解决方案 »
- 建立mysql集群时,选择簇,还是heartbeat的方式?谁能帮忙介绍一下两种到底用在什么情况中吗?
- 求数据条数!!
- 批量插入 求解
- 询问个insert的SQL语句
- MYSQL 急!!#1016 - Can't open file: 'table_name.ibd' (errno: 1)
- MYSQL高手过来帮解决一个行列互转的问题
- mysql建表,想设定email字段是唯一(一个email注册一个ID),怎么设定?
- 关于eclipse+myeclipse+tomcat+mysql的配置问题
- >MYSQL,别处还有好的论坛去处吗?谢谢!!<
- mysql和其他数据库字段对应关系
- 一个更新SQL语句,MSSQL知道怎么做,MYSQL不知道怎么做了
- 如何根据搜索到的字符串的行返回前3行的值
比如END$$ /////26行