USE [RohanGame]
GO
/****** Object: StoredProcedure [dbo].[ROHAN2_ReloadNoticeSystem] Script Date: 8/31/2022 3:32:54 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*================================================= =
@
[Only registered and activated users can see links. Click Here To Register...] weonia
@
[Only registered and activated users can see links. Click Here To Register...] 2011-11-03
서버가 실행된후 수정된 공지를 타입별로 읽어온다.
================================================== */
CREATE procedure [dbo].[ROHAN2_ReloadNoticeSystem]
@
[Only registered and activated users can see links. Click Here To Register...] tinyint
as
set nocount on
--롤링공지 최대 개수는 14개
declare @
[Only registered and activated users can see links. Click Here To Register...]t int
if (select count(*) from TRollingNotice where applied = 1 and camp = @
[Only registered and activated users can see links. Click Here To Register...]) <> 0
begin
select top 14 seq, camp, period, content
from TRollingNotice
where content is not null and camp = @
[Only registered and activated users can see links. Click Here To Register...]
update TRollingNotice set applied = 0
where camp = @
[Only registered and activated users can see links. Click Here To Register...]
set @
[Only registered and activated users can see links. Click Here To Register...]t =@@error
end
else
begin
select top 1 seq, camp, period, content
from TRollingNotice
where applied = 1 and camp = @
[Only registered and activated users can see links. Click Here To Register...]
set @
[Only registered and activated users can see links. Click Here To Register...]t = -1
end
return @
[Only registered and activated users can see links. Click Here To Register...]t
GO