Jump to content
Araştır
  • Diğer seçenekler ...
Sonuçları bul ...
Sonuçları bul ...
BORNTOKILL

Login prosedür

Önerilen Mesajlar

ÖNCELİKLE S.A HERKEZE SORUNUM OYUNA HER YENİ CHAR AÇILDIĞINDA PREMİUMLU OLARAK BAŞLAMASIDIR BELKİ ÇOK KOLAYDIR AMA YENİYİM DİYE KONU AÇIYORUM TEŞEKKÜR EDERİM HERKEZE.BU PAYLAŞTIĞIM LOGİN PROSEDÜRÜNÜN NERESİNİ AYARLASAM YENİ CHARLAR PREMİUMSUZ BAŞLAR...




CREATE PROCEDURE ACCOUNT_LOGIN
@AccountID varchar(21),
@Password varchar(13),
@nRet smallint OUTPUT

as
-- # Account Nation Transfers Queue # --
EXEC ACCOUNT_NATION_TRANSFER ''

select @nRet = count(straccountid) from tb_user where straccountid = @AccountID

if @nRet = 0
begin
insert into tb_user (straccountid, strpasswd, strSocNo, idays) values (@AccountID, @password, 1, '6')
end

--CurrentUserdan Silelim
delete from currentuser where straccountid = @AccountID

declare @ban int , @ban1 int, @ban2 int
select @nRet = count(straccountid) from currentuser
select @ban = authority from userdata where struserid = (select strcharid1 from account_char where straccountid = @AccountID and strcharid1 is not null )
select @ban1 = authority from userdata where struserid = (select strcharid2 from account_char where straccountid = @AccountID and strcharid1 is not null )
select @ban2 = authority from userdata where struserid = (select strcharid3 from account_char where straccountid = @AccountID and strcharid1 is not null )

if @ban = 255 or @ban1 = 255 or @ban2 = 255
begin
Set @nRet = 2
RETURN
end


DECLARE @Nation tinyint, @CharNum smallint
SET @Nation = 0
SET @CharNum = 0

DECLARE @pwd varchar(13)

SET @pwd = null

SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and idays=6
IF @pwd IS null
BEGIN
SET @nRet = 0
--SET @nRet = 2
RETURN
END

ELSE IF @pwd @Password
BEGIN
SET @nRet = 0
--SET @nRet = 3
RETURN
END

DECLARE @gokhantasci varchar(21)
select @gokhantasci = count(straccountid) FROM premium_service WHERE strAccountID = @AccountID

if @gokhantasci = 0
begin
insert into PREMIUM_SERVICE (strAccountID, strType, nDays) VALUES (@AccountID, 1, 3)
end

SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @@ROWCOUNT = 0
BEGIN
SET @nRet = 1
RETURN
END
IF @CharNum = 0
BEGIN
SET @nRet = 1
RETURN
END
ELSE
BEGIN
SET @nRet = @Nation+1
--SET @nRet = 1
RETURN
END
GO

İletiyi paylaş


Link to post
Sitelerde Paylaş
@ gandaf82;

Bu kısmı

DECLARE @gokhantasci VARCHAR(21)
SELECT @gokhantasci = COUNT(straccountid) FROM premium_service WHERE strAccountID = @AccountID

IF @gokhantasci = 0
BEGIN
INSERT INTO PREMIUM_SERVICE (strAccountID, strType, nDays) VALUES (@AccountID, 1, 3)
END


prosedüründen sil.

İletiyi paylaş


Link to post
Sitelerde Paylaş

Alternatif olarak;


INSERT INTO PREMIUM_SERVICE (strAccountID, strType, nDays) VALUES (@AccountID, 1, 3)


satırını


INSERT INTO PREMIUM_SERVICE (strAccountID, strType, nDays) VALUES (@AccountID, 1, 0)


olarak değiştir.

İletiyi paylaş


Link to post
Sitelerde Paylaş

Düzenleme yaptım hocam şu şekil LOGIN PROSEDUR SIKINTIMI BİTİRDİ TEŞEKKÜR EDERİM SİZLEREDE YARDIMCI OLDUNUZ İÇİ

CREATE PROCEDURE ACCOUNT_LOGIN
@AccountID varchar(21),
@Password varchar(13),
@nRet smallint OUTPUT

as
-- # Account Nation Transfers Queue # --
EXEC ACCOUNT_NATION_TRANSFER ''

select @nRet = count(straccountid) from tb_user where straccountid = @AccountID

if @nRet = 0
begin
insert into tb_user (straccountid, strpasswd, strSocNo, idays) values (@AccountID, @password, 1, '6')
end

--CurrentUserdan Silelim
delete from currentuser where straccountid = @AccountID

declare @ban int , @ban1 int, @ban2 int
select @nRet = count(straccountid) from currentuser
select @ban = authority from userdata where struserid = (select strcharid1 from account_char where straccountid = @AccountID and strcharid1 is not null )
select @ban1 = authority from userdata where struserid = (select strcharid2 from account_char where straccountid = @AccountID and strcharid1 is not null )
select @ban2 = authority from userdata where struserid = (select strcharid3 from account_char where straccountid = @AccountID and strcharid1 is not null )

if @ban = 255 or @ban1 = 255 or @ban2 = 255
begin
Set @nRet = 2
RETURN
end


DECLARE @Nation tinyint, @CharNum smallint
SET @Nation = 0
SET @CharNum = 0
DECLARE @pwd varchar(13)
SET @pwd = null
SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID
IF @pwd IS null
BEGIN
SET @nRet = 0
RETURN
END
ELSE IF @pwd @Password
BEGIN
SET @nRet = 0
RETURN
END




SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @@ROWCOUNT = 0
BEGIN
SET @nRet = 1
RETURN
END
IF @CharNum = 0
BEGIN
SET @nRet = 1
RETURN
END
ELSE
BEGIN
SET @nRet = @Nation+1
--SET @nRet = 1
RETURN
END
GO

İletiyi paylaş


Link to post
Sitelerde Paylaş

×
×
  • Yeni Oluştur...