Would you like to react to this message? Create an account in a few clicks or log in to continue.

Yenileniyoruz!
 
AnasayfaAnasayfa  Latest imagesLatest images  Kayıt OlKayıt Ol  Giriş yapGiriş yap  

 

 [Paylaşım] Sorusnuz NATION_SELECT Prosedürü! Yeni Güncel!

Aşağa gitmek 
YazarMesaj
ImSoRy
Moderatör
Moderatör
ImSoRy


Mesaj Sayısı Mesaj Sayısı : 56
Başarı Puanı Başarı Puanı : 234
Rep Puanı Rep Puanı : 0
Bölümü Bölümü : Oyunlar / Webmaster

[Paylaşım] Sorusnuz NATION_SELECT Prosedürü! Yeni Güncel! Empty
MesajKonu: [Paylaşım] Sorusnuz NATION_SELECT Prosedürü! Yeni Güncel!   [Paylaşım] Sorusnuz NATION_SELECT Prosedürü! Yeni Güncel! I_icon_minitimePtsi Tem. 12, 2010 5:56 am

Artık Bu İşlerede Bulaştım Hadi Bakalım Smile



Kod:


-- Created by Samma
-- GÜNCELLEME : DONTE
-- 21.10.2009

CREATE PROCEDURE NATION_SELECT
@nRet        smallint    OUTPUT,
@AccountID    char(21),
@Nation    tinyint
AS

DECLARE @Row tinyint
    SET @Row = 0

strAccountID = @AccountID


BEGIN TRAN   

    SELECT @Row = COUNT(*) FROM  ACCOUNT_CHAR  WHERE strAccountID = @AccountID
    IF @Row > 0
        UPDATE ACCOUNT_CHAR SET bNation = @Nation WHERE strAccountID = @AccountID
    ELSE
        INSERT INTO ACCOUNT_CHAR (strAccountID, bNation ) VALUES (@AccountID, @Nation)

    SELECT @Row = COUNT(*) FROM  WAREHOUSE  WHERE strAccountID = @AccountID
    IF @Row = 0   
        INSERT INTO WAREHOUSE ( strAccountID ) VALUES (@AccountID)

    IF @@ERROR <> 0
    BEGIN   
        ROLLBACK TRAN
        SET @nRet =  -2   
        RETURN
    END
   
COMMIT TRAN
SET @nRet =  1


GO


[SIZE="4"]Orjinali [/SIZE]

Kod:

/****** Object:  Stored Procedure dbo.NATION_SELECT    script Date: 6/6/2006 6:03:33 PM ******/



-- Created by Samma
-- 2002.01.18

CREATE PROCEDURE NATION_SELECT
@nRet        smallint    OUTPUT,
@AccountID    char(21),
@Nation    tinyint
AS

DECLARE @Row tinyint
    SET @Row = 0

SELECT @Row = COUNT(*) FROM  ACCOUNT_CHAR  WHERE strAccountID = @AccountID
    IF @Row > 0   
BEGIN
    SET @nRet = -1
RETURN
END

BEGIN TRAN   

    SELECT @Row = COUNT(*) FROM  ACCOUNT_CHAR  WHERE strAccountID = @AccountID
    IF @Row > 0
        UPDATE ACCOUNT_CHAR SET bNation = @Nation WHERE strAccountID = @AccountID
    ELSE
        INSERT INTO ACCOUNT_CHAR (strAccountID, bNation ) VALUES (@AccountID, @Nation)

    SELECT @Row = COUNT(*) FROM  WAREHOUSE  WHERE strAccountID = @AccountID
    IF @Row = 0   
        INSERT INTO WAREHOUSE ( strAccountID ) VALUES (@AccountID)


    END
   
COMMIT TRAN
SET @nRet =  1


GO


İyi Kullanmalar Wink
Sayfa başına dön Aşağa gitmek
 
[Paylaşım] Sorusnuz NATION_SELECT Prosedürü! Yeni Güncel!
Sayfa başına dön 
1 sayfadaki 1 sayfası
 Similar topics
-
» [Paylaşım] Yeni Oto Master Prosedürü
» [PAYLAŞIM]NP Increase Scroll
» [Paylaşım] Usko Premium NPC
» [Paylaşım] Zor Serverlar için Partydeki Kişi Sayısına Göre Exp Gelmesi !
» [PAYLAŞIM] Günlük NP Sıralaması - PHP Kodu iLe Birlikte

Bu forumun müsaadesi var:Bu forumdaki mesajlara cevap veremezsiniz
 :: Oyun :: Private Serverlar :: Prosedür & Kodlar-
Buraya geçin: