FID
www.2cto.com
end
close topic_cursor
deallocate topic_cursor
--更新论坛 dnt_posts1的fid
declare post_cursor cursor scroll
for
SELECT [pid],[fid] from [nsd_forum_discuz25].[dbo].[dnt_posts1] where pid<>0 ORDER BY pid
open post_cursor
declare @pid int
fetch next from post_cursor into @pid,@fid
while(@@fetch_status=0)
www.2cto.com
begin
update [nsd_forum_discuz25].[dbo].[dnt_posts1] set fid=(select fid from [nsd_forum_discuz25].[dbo].[dnt_forums] where oldfid=@fid) where pid=@pid
--print str(@parentid)
fetch next from post_cursor into @pid,@fid
end
close post_cursor
deallocate post_cursor
作者 ctz168