Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Send cards

Status
Not open for further replies.
Junior Spellweaver
Joined
Apr 19, 2006
Messages
119
Reaction score
15
DECLARE @UID INT
DECLARE carD_TYPEID INT
DECLARE carD_QTY INT

SET @UID = 1 -- your uid
SET carD_TYPEID = 1 -- card type number
SET carD_QTY = 1 -- card quantity to add

IF EXISTS(SELECT 1 FROM TD_CARD_USRS WHERE UID = @UID AND CARD_TYPEID = carD_TYPEID) BEGIN
UPDATE TD_CARD_USRS SET QTY = QTY + carD_QTY , USE_YN = 'Y' WHERE UID = @UID
END ELSE BEGIN
INSERT INTO TD_CARD_USRS(UID,CARD_TYPEID,QTY,USE_YN) VALUES (@UID carD_TYPEID carD_QTY,'Y')
END
 
Upvote 0
Junior Spellweaver
Joined
Apr 19, 2006
Messages
119
Reaction score
15
Code:
DECLARE @UID INT
DECLARE     [USER=270052]car[/USER]D_TYPEID INT
DECLARE     [USER=270052]car[/USER]D_QTY INT

SET @UID = 1 -- your uid
SET    [USER=270052]car[/USER]D_TYPEID = 1 -- card type number
SET    [USER=270052]car[/USER]D_QTY = 1 -- card quantity to add

IF EXISTS(SELECT 1 FROM TD_CARD_USRS WHERE UID = @UID AND CARD_TYPEID = #D_TYPEID) BEGIN
UPDATE TD_CARD_USRS SET QTY = QTY +     [USER=270052]car[/USER]D_QTY , USE_YN = 'Y' WHERE UID = @UID
END ELSE BEGIN
INSERT INTO TD_CARD_USRS(UID,CARD_TYPEID,QTY,USE_YN) VALUES (@UID    [USER=270052]car[/USER]D_TYPEID,    [USER=270052]car[/USER]D_QTY,'Y')
END

Forums is freak its change my code try to uppercase carD_TYPEID AND carD_QTY

try link
 
Last edited:
Upvote 0
Loyalty
Loyal Member
Joined
May 4, 2012
Messages
1,763
Reaction score
884
It seems the problem has been solved , I will be closing the thread for now ,if the problem still persists and OP desires the thread to be opened again , please drop me a PM
 
Last edited:
Upvote 0
Status
Not open for further replies.
Back
Top