Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ----------------------------
- -- Procedure structure for WZ_SetSkinsBought
- -- ----------------------------
- ALTER PROCEDURE [dbo].[WZ_SetSkinsBought]
- @in_CustomerID int,
- @in_WeaponItemID int,
- @in_Skins int,
- @in_Selected int
- AS
- BEGIN
- SET NOCOUNT ON;
- -- routine body goes here, e.g.
- -- SELECT 'Navicat for SQL Server'
- if(not exists(select * from WeaponSkins where CustomerID=@in_CustomerID and WeaponItemID=@in_WeaponItemID and Skins=0)) begin
- insert into WeaponSkins (
- CustomerID,
- WeaponItemID,
- Skins,
- Selected
- ) values (
- @in_CustomerID,
- @in_WeaponItemID,
- 0,
- @in_Selected
- )
- END
- if(not exists(select * from WeaponSkins where CustomerID=@in_CustomerID and WeaponItemID=@in_WeaponItemID and Skins=@in_Skins)) begin
- insert into WeaponSkins (
- CustomerID,
- WeaponItemID,
- Skins,
- Selected
- ) values (
- @in_CustomerID,
- @in_WeaponItemID,
- @in_Skins,
- @in_Selected
- )
- select 0 as ResultCode
- return
- end
- update WeaponSkins set Selected=@in_Selected where CustomerID=@in_CustomerID and WeaponItemID=@in_WeaponItemID
- select 0 as ResultCode
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement