- Joined
- Apr 2, 2013
- Messages
- 1,098
- Reaction score
- 4,586
Basic useful querys I did a few years ago to add gamepoint and items to the user via email or gamertag. |
Add GamePoints by GamerTag
PHP:
|
Add GamePoints by Email
PHP:
|
[TR]
[TD]
[TD]
Add Item by GamerTag
PHP:
declare @in_CustomerID int;
declare @in_Gamertag nvarchar(64);
declare @in_ItemID int;
declare @in_Quantity int;
SET @in_Gamertag = 'Yuri-BR'; -- Gamertag
SET @in_ItemID = 101088; -- ItemID
SET @in_Quantity = 5; -- Quantity
SELECT @in_CustomerID = CustomerID FROM UsersChars WHERE Gamertag = @in_Gamertag;
INSERT INTO UsersInventory (CustomerID, CharID, BackpackSlot, ItemID, LeasedUntil, Quantity, Var1, Var2, Var3)
VALUES (@in_CustomerID, 0, 0, @in_ItemID, GETDATE(), @in_Quantity, -1, -1, 10000);
[/TR]
[TR]
[TD]
Add Item by Email
PHP:
declare @in_CustomerID int;
declare @in_Email varchar(128);
declare @in_ItemID int;
declare @in_Quantity int;
SET @in_Email = 'Yuri-BR@email.com'; -- Email
SET @in_ItemID = 101088; -- ItemID
SET @in_Quantity = 5; -- Quantity
SELECT @in_CustomerID = CustomerID FROM Accounts WHERE email = @in_Email;
INSERT INTO UsersInventory (CustomerID, CharID, BackpackSlot, ItemID, LeasedUntil, Quantity, Var1, Var2, Var3)
VALUES (@in_CustomerID, 0, 0, @in_ItemID, GETDATE(), @in_Quantity, -1, -1, 10000);
[/TR]
Last edited: