⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 accountdata.sql

📁 Soul的源代码,类似于劲舞团之类的游戏
💻 SQL
字号:
create table AccountData
(
CAccountID char(16) not null,
CPassword char(16),
iAccountID int IDENTITY(0,1),
cLogIP char(16),
iAdminLevel tinyint default(0),
LoginDate smalldatetime default (getdate()),
LogoutDate smalldatetime default (getdate()),
BlockData smalldatetime default (getdate()),
Account_Data smalldatetime default (getdate() - 1),
iAccount_Time int default(0)
)
--drop table AccountData
alter table dbo.AccountData add constraint AccountData_CL 
primary key clustered(CAccountID)
--drop proc dbo.s_AccSt
create proc dbo.s_AccSt
    @AID AS char(16)
AS
SET NOCOUNT ON
select CPassword,iAccountID,iAdminLevel,BlockData
 from dbo.AccountData where CAccountID = @AID
go
exec s_AccSt 'hoon1'



/*Update 且 惑炔捞 割俺牢啊*/
/*
create proc sp_AccUp
@AID as char(16),
@Pass as char(16),
@IAID as int,
@LIP as char(16),
@AL as tinyint,
@LDt as smalldatetime,
@LTDt as smalldatetime,
@BLDt as smalldatetime,
@ADt as smalldatetime,
@ATM int
As
begin tran
update AccountData set 
CPassword = @Pass,
iAccountID = @IAID,
cLogIP = @LIP,
iAdminLevel = @AL,
LoginDate = @LDt,
LogoutDate = @LTDt,
BlockData = @BLDt,
Account_Data = @ADt,
iAccount_Time = @ATM
where CAccountID = @AID
if @@Error <> 0
	begin
		rollback tran
	end
else
	begin
		commit tran
	end
go
drop proc s_AccUp*/

--@LDt as smalldatetime,
--drop proc dbo.s_AccLIUp
/*@LDt*/
create proc dbo.s_AccLIUp
    @AID AS char(16),
    @LIP as char(16)
As
SET NOCOUNT ON
begin tran
update AccountData set cLogIP = @LIP, LoginDate = getdate()  where CAccountID = @AID
if @@Error <> 0
	begin
		rollback tran
	end
else
	begin
		commit tran
	end
go

select * from AccountData
exec s_AccLIUp 'hoon1','1.1.1.1'

exec sp_lock

exec s_AccLIUp '1234567890123456','2004-05-05','1.2.44.44'

select * from AccountData

--drop proc dbo.s_AccLOUp
create proc dbo.s_AccLOUp
@AID as char(16)
--@LTDt as smalldatetime
As
SET NOCOUNT ON
begin tran
update AccountData set 
LogoutDate = getdate()--@LTDt
where CAccountID = @AID
if @@Error <> 0
	begin
		rollback tran
	end
else
	begin
		commit tran
	end
go
/*
牢汲飘绰 权其捞瘤俊辑 茄促.
create proc sp_AccIn
@AID as char(16),
@Pass as char(16),
@IAID as int,
@LIP as char(16),
@AL as tinyint,
@LDt as smalldatetime,
@LTDt as smalldatetime,
@BLDt as smalldatetime,
@ADt as smalldatetime,
@ATM int
As
begin tran
insert AccountData values (@AID, @Pass, @IAID, @LIP, @AL, @LDt, @LTDt, @BLDt, @ADt, @ATM)
if @@Error <> 0
	begin
		rollback tran
	end
else
	begin
		commit tran
	end
go
drop proc sp_AccIn
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -