Home  >  Article  >  Database  >  Limit frequent website visits

Limit frequent website visits

大家讲道理
大家讲道理Original
2016-11-10 11:34:221275browse

CREATE TABLE [dbo].[Zz_AccessIP](
    [IP] [nvarchar](50) NOT NULL,
    [FirstDateTime] [datetime] NOT NULL,
    [LastDateTime] [datetime] NOT NULL,
    [Times] [int] NOT NULL,
 CONSTRAINT [PK_Zz_AccessIP] PRIMARY KEY CLUSTERED 
(
    [IP] 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
 
ALTER TABLE [dbo].[Zz_AccessIP] ADD  CONSTRAINT [DF_Zz_AccessIP_FirstDateTime]  DEFAULT (getdate()) FOR [FirstDateTime]
GO
 
ALTER TABLE [dbo].[Zz_AccessIP] ADD  CONSTRAINT [DF_Zz_AccessIP_LastDateTime]  DEFAULT (getdate()) FOR [LastDateTime]
GO
 
ALTER TABLE [dbo].[Zz_AccessIP] ADD  CONSTRAINT [DF_Zz_AccessIP_Times]  DEFAULT ((0)) FOR [Times]
GO

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn