56,679
社区成员
发帖
与我相关
我的任务
分享
create procedure p_AddArtisType(isAdd int,aId varchar(50),tIds varchar(500) )
BEGIN
if isAdd=1 then
if tIds!='' then
set @updatesql =CONCAT(' insert into artiststype(AId,TId,IdPath,NamePath) select ',aId,',ID,FullID,FullName from t_part_info where ID in(',tIds,')');
PREPARE sqltext from @updatesql;
execute sqltext;
end if;
else
if tIds!='' then
delete from artiststype where AId=cast(aId as unsigned);
commit;
/*
set @updatesql =CONCAT('insert into artiststype(AId,TId,IdPath,NamePath) select ',aId,',ID,FullID,FullName from t_part_info where ID in(',tIds,');');
PREPARE sqltext from @updatesql;
execute sqltext;
*/
end if;
end if;
END