-
c++
RanShop Problem
When Buying Items on Itemshop I Can't Receive It On My Itembank
can some share to me the correct script for shoppurchase?
thank you
-
-
Account Upgraded | Title Enabled!
Re: RanShop Problem
try this my treasure script and dont forget to press thank if helps ^_^
Quote:
USE [RanShop]
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_ShopPurchase_PurPrice]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[ShopPurchase] DROP CONSTRAINT [DF_ShopPurchase_PurPrice]
END
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_ShopPurchase_PurFlag]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[ShopPurchase] DROP CONSTRAINT [DF_ShopPurchase_PurFlag]
END
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_ShopPurchase_PurDate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[ShopPurchase] DROP CONSTRAINT [DF_ShopPurchase_PurDate]
END
GO
USE [RanShop]
GO
/****** Object: Table [dbo].[ShopPurchase] Script Date: 05/20/2010 19:17:31 ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ShopPurchase]') AND type in (N'U'))
DROP TABLE [dbo].[ShopPurchase]
GO
USE [RanShop]
GO
/****** Object: Table [dbo].[ShopPurchase] Script Date: 05/20/2010 19:17:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ShopPurchase](
[PurKey] [varchar](21) NOT NULL,
[UserUID] [varchar](20) NOT NULL,
[ProductNum] [int] NOT NULL,
[PurPrice] [int] NOT NULL,
[PurFlag] [int] NOT NULL,
[PurDate] [datetime] NOT NULL,
[PurChgDate] [datetime] NULL,
CONSTRAINT [PK_ShopPurchase] PRIMARY KEY CLUSTERED
(
[PurKey] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[ShopPurchase] ADD CONSTRAINT [DF_ShopPurchase_PurPrice] DEFAULT ((0)) FOR [PurPrice]
GO
ALTER TABLE [dbo].[ShopPurchase] ADD CONSTRAINT [DF_ShopPurchase_PurFlag] DEFAULT ((0)) FOR [PurFlag]
GO
ALTER TABLE [dbo].[ShopPurchase] ADD CONSTRAINT [DF_ShopPurchase_PurDate] DEFAULT (getdate()) FOR [PurDate]
GO