Kullanımı ;
Programın Özellikleri :
Buradan Premium Yöneticisi 'ni İndirebilirsiniz.
Eğer çalıştıramazsanız ; ( Değişiklik yapmadan önce DB yedeği alınız.)
Tablo ; ( TB_USER tablosuna aşağıdaki sütunları ekleyin. )
Kod:
PreDay - int - 4
Premium - int - 4
Prosedür ; ( Eğer prosedür varsa, LOAD_PREMIUM_SERVICE_USER, UPDATE_PREMIUM_SERVICE_USER prosedürlerini aşağıdaki gibi değiştirin. )
Kod:
CREATE PROCEDURE LOAD_PREMIUM_SERVICE_USER
@AccountID varchar(27),
@nRet1 smallint OUTPUT,
@nRet2 smallint OUTPUT
AS
DECLARE @nRow smallint
SET @nRow = 0
DECLARE @Type smallint
SET @Type = null
DECLARE @Days smallint
SET @Days = null
SELECT @nRow = COUNT(*) FROM TB_USER WHERE strAccountID = @AccountID and Premium > 0
IF @nRow = 0
BEGIN
SET @nRet1 = 0
SET @nRet2 = 0
RETURN
END
BEGIN TRAN
SELECT @Type = Premium, @Days = PreDay FROM TB_USER WHERE strAccountID = @AccountID
IF @Days = 0
BEGIN
UPDATE TB_USER SET Premium = 0 WHERE strAccountID = @AccountID
SET @nRet1 = 0
SET @nRet2 = 0
RETURN
END
COMMIT TRAN
SET @nRet1 = @Type
SET @nRet2 = @Days
GO
Kod:
CREATE PROCEDURE UPDATE_PREMIUM_SERVICE_USER
@AccountID varchar(27),
@Days smallint
AS
UPDATE TB_USER SET PreDay = @Days WHERE strAccountID = @AccountID
UPDATE TB_USER SET Premium = 0 WHERE PreDay = 0 and Premium = 1
GO
- SQL Bağlantı Ayarlarını yapın
- Char adını girerek göster'e tıklayın.
- Ekle ve Sil butonlarından Premium silip ekleyebilirsiniz.
- Gün Ekle'dende premium gününü arttırabilirsiniz.
- Eğer programı sürekli açık tutarsanız. Her gece 00:00'da
premium sürelerinden 1 gün düşecektir. ( Kesinlikle serverınızı yormaz.)
Programın Özellikleri :
- Premium Ekleme/Silme
- Premium Gün Sayısı Ekleme
- Programı full açık tuttuğunuz takdirde her gün premium süresini
1 gün kısaltabilme ( Premium sistemi tam olarak çalışmayan db'ler için
)
Buradan Premium Yöneticisi 'ni İndirebilirsiniz.
Eğer çalıştıramazsanız ; ( Değişiklik yapmadan önce DB yedeği alınız.)
Tablo ; ( TB_USER tablosuna aşağıdaki sütunları ekleyin. )
Kod:
PreDay - int - 4
Premium - int - 4
Prosedür ; ( Eğer prosedür varsa, LOAD_PREMIUM_SERVICE_USER, UPDATE_PREMIUM_SERVICE_USER prosedürlerini aşağıdaki gibi değiştirin. )
Kod:
CREATE PROCEDURE LOAD_PREMIUM_SERVICE_USER
@AccountID varchar(27),
@nRet1 smallint OUTPUT,
@nRet2 smallint OUTPUT
AS
DECLARE @nRow smallint
SET @nRow = 0
DECLARE @Type smallint
SET @Type = null
DECLARE @Days smallint
SET @Days = null
SELECT @nRow = COUNT(*) FROM TB_USER WHERE strAccountID = @AccountID and Premium > 0
IF @nRow = 0
BEGIN
SET @nRet1 = 0
SET @nRet2 = 0
RETURN
END
BEGIN TRAN
SELECT @Type = Premium, @Days = PreDay FROM TB_USER WHERE strAccountID = @AccountID
IF @Days = 0
BEGIN
UPDATE TB_USER SET Premium = 0 WHERE strAccountID = @AccountID
SET @nRet1 = 0
SET @nRet2 = 0
RETURN
END
COMMIT TRAN
SET @nRet1 = @Type
SET @nRet2 = @Days
GO
Kod:
CREATE PROCEDURE UPDATE_PREMIUM_SERVICE_USER
@AccountID varchar(27),
@Days smallint
AS
UPDATE TB_USER SET PreDay = @Days WHERE strAccountID = @AccountID
UPDATE TB_USER SET Premium = 0 WHERE PreDay = 0 and Premium = 1
GO