Kod:
nedeni belli
Kod:
-- update etmesi gerek :O neden ? : premium son gunu olayı icin gerekli
-- AyH.
CREATE PROCEDURE update_premium_service_user
@AccountID varchar(21),
@premiumdays datetime
AS
declare @pretype int
set @pretype = 1
select @pretype = premiumtype , @premiumdays =premiumdays from TB_USER WHERE strAccountID = @AccountID
if @pretype=1 and @premiumdays <getdate()+1
update TB_USER set premiumtype = 0 WHERE strAccountID = @AccountID
GO
nedeni belli
Kod:
-- update etmesi gerek :O neden ? : premium son gunu olayı icin gerekli
-- AyH.
CREATE PROCEDURE update_premium_service_user
@AccountID varchar(21),
@premiumdays datetime
AS
declare @pretype int
set @pretype = 1
select @pretype = premiumtype , @premiumdays =premiumdays from TB_USER WHERE strAccountID = @AccountID
if @pretype=1 and @premiumdays <getdate()+1
update TB_USER set premiumtype = 0 WHERE strAccountID = @AccountID
GO