General-Xenon
سه شنبه 04 تیر 1392, 11:18 صبح
توی پست اول هست
 
یک Database بساز به همون نام و این کد ها رو import کن
CREATE TABLE [dbo].[users](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [name] [varchar](50) NOT NULL,
    [password] [varchar](50) NOT NULL,
    [email] [varchar](250) NOT NULL,
    [user_type] [varchar](50) NOT NULL,
 CONSTRAINT [PK_users] PRIMARY KEY CLUSTERED 
(
    [id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
INSERT [dbo].[users] ([name], [password], [email], [user_type]) VALUES (N'John', N'pass', N'johndoe@hotmail.com', N'administrator')
/****** Object:  Table [dbo].[orders]    Script Date: 06/11/2013 15:41:40 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
CREATE TABLE [dbo].[orders](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [client] [varchar](50) NOT NULL,
    [product] [varchar](250) NOT NULL,
    [amount] [int] NOT NULL,
    [price] [float] NOT NULL,
    [date] [date] NOT NULL,
    [orderShipped] [bit] NOT NULL,
 CONSTRAINT [PK_orders] PRIMARY KEY CLUSTERED 
(
    [id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'Beatle', N'Café Au Lait', 5, 2.5, CAST(0xFF360B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'beatle', N'Café Au Lait', 2, 2.5, CAST(0x0B370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'beatle', N'Café Au Lait', 8, 2.5, CAST(0x0B370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'beatle', N'Café Au Lait', 5, 2.5, CAST(0x17370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'Customer', N'Café Au Lait', 10, 2.5, CAST(0x17370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'Customer', N'Café Au Lait', 25, 2.5, CAST(0x17370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'Customer', N'Café Au Lait', 5, 2.5, CAST(0x18370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'jane', N'Café Au Lait', 100, 2.5, CAST(0x18370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'beatle', N'Café Au Lait', 2, 2.5, CAST(0x18370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'beatle', N'Galao', 4, 2.8, CAST(0x18370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'beatle', N'White Chocalate Peppermint Mocha', 5, 3.4, CAST(0x18370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'John', N'Galao', 10, 2.8, CAST(0x18370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'John', N'White Chocalate Peppermint Mocha', 5, 3.4, CAST(0x18370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'beatle', N'White Chocalate Peppermint Mocha', 5, 3.4, CAST(0x1E370B00 AS Date), 0)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'beatle', N'Café Au Lait', 5, 2.5, CAST(0x2B370B00 AS Date), 1)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'beatle', N'Galao', 4, 2.8, CAST(0x2B370B00 AS Date), 1)
INSERT [dbo].[orders] ([client], [product], [amount], [price], [date], [orderShipped]) VALUES (N'beatle', N'White Chocalate Peppermint Mocha', 3, 3.4, CAST(0x2B370B00 AS Date), 1)
/****** Object:  Table [dbo].[coffee]    Script Date: 06/11/2013 15:41:40 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
CREATE TABLE [dbo].[coffee](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [name] [varchar](50) NOT NULL,
    [type] [varchar](50) NOT NULL,
    [price] [float] NOT NULL,
    [roast] [varchar](50) NOT NULL,
    [country] [varchar](50) NOT NULL,
    [image] [varchar](255) NULL,
    [review] [text] NOT NULL,
 CONSTRAINT [PK_coffee_1] PRIMARY KEY CLUSTERED 
(
    [id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
SET ANSI_PADDING OFF
INSERT [dbo].[coffee] ([name], [type], [price], [roast], [country], [image], [review]) VALUES (N'Café Au Lait', N'Espresso', 2.5, N'Light', N'Italy', N'../Images/Coffee/Cafe-Au-Lait.jpg', N'Description')
INSERT [dbo].[coffee] ([name], [type], [price], [roast], [country], [image], [review]) VALUES (N'Galao', N'Regular', 2.8, N'Light', N'Portugal', N'../Images/Coffee/galao_kaffee_portugal.jpg', N'DAT DESCRIPTION')
INSERT [dbo].[coffee] ([name], [type], [price], [roast], [country], [image], [review]) VALUES (N'White Chocalate Peppermint Mocha', N'Espresso', 3.4, N'Medium', N'Spain', N'../Images/Coffee/white-chocolate-peppermint-mocha.jpg', N'DAT MOCHA')
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.