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

You are not connected. Please login or register

[Paylaşım] Clan'ı Kurun G1 Olsun :)

Go down  Message [Page 1 of 1]

1hot [Paylaşım] Clan'ı Kurun G1 Olsun :) Mon Apr 19, 2010 10:16 am

VulpinEMarteN

VulpinEMarteN
Üye
Üye

Kod:DECLARE
@Row tinyint, @knightsindex smallint, @knightsname
char(21)

SET @Row = 0 SET @knightsindex = 0 SET
@knightsname = ''

SELECT @Row = COUNT(*) FROM KNIGHTS
WHERE IDNum = @index or IDName = @strName

IF @Row
> 0 or @index = 0

BEGIN

SET
@nRet =
3

RETURN

END

BEGIN
TRAN

INSERT INTO KNIGHTS ( IDNum, Nation, Flag,
IDName, Chief )

VALUES (@index, @nation, @community,
@strName, @strChief )



INSERT
INTO KNIGHTS_USER ( sIDNum, strUserID )

VALUES
(@index, @strChief )

IF @@ERROR
0

BEGIN

ROLLBACK TRAN


SET @nRet =
6

RETURN

END

IF
@@ERROR 0

BEGIN

ROLLBACK TRAN


SET @nRet =
6

RETURN

END

COMMIT
TRAN

SET @nRet = 0

update Knights
set Points = '720000' where IDName = @knightsname

GO

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum