搜索
 找回密码
 加入

人物已在线,是否T下线? 谁帮忙解决下!

sd8336818 2009-2-23 19:52:29 961
人物已在线,是否T下线? 谁帮忙解决下! 最好详细点噢。。看过的方法太多 改起来没什么用?听说是储存过程的问题  应该详细的怎么改?!呢

4 回复

熊猫
2008-9-28 00:27:06
点击查看详情
不同的AU 有不同的存储...

你试下把 ACCOUNT_LOGOUT存储改成下面这个

CREATE PROCEDURE ACCOUNT_LOGOUT
@AccountID        varchar(21),
@nRet                smallint        OUTPUT
AS
BEGIN TRAN
        DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID
       
COMMIT TRAN
SET @nRet = 1
GO
sd8336818
2008-9-28 02:58:28
楼主
试之前  先谢谢 大哥了!
xy305173481
2009-2-23 17:42:49
就这么简单的一个存储?
ft222
2009-2-23 19:52:29
用我这个L程序,再改一次存储过程

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ACCOUNT_LOGIN]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[ACCOUNT_LOGIN]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ACCOUNT_LOGIs]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[ACCOUNT_LOGIs]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ACCOUNT_LOGOUT]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[ACCOUNT_LOGOUT]
GO

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO

CREATE PROCEDURE ACCOUNT_LOGIN
@AccountID    varchar(21),
@Password    varchar(13),
@nRet        smallint    OUTPUT

AS


DECLARE @Nation tinyint, @CharNum smallint
SET @Nation = 0
SET @CharNum = 0

DECLARE @pwd varchar(13)

SET @pwd = null

SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and idays=6
IF @pwd IS null
BEGIN
    SET @nRet = 0
             --SET @nRet = 4
    RETURN
END

ELSE IF @pwd <> @Password
BEGIN
    SET @nRet = 0
             --SET @nRet = 3
    RETURN
END

DECLARE @gokhantasci varchar(21)
select @gokhantasci = count(straccountid)  FROM premium_service WHERE strAccountID = @AccountID

if @gokhantasci = 0
begin
insert into PREMIUM_SERVICE (strAccountID, strType, nDays) VALUES (@AccountID, 1, 3)
end

SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @@ROWCOUNT = 0
BEGIN
    SET @nRet = 1
    RETURN
END
IF @CharNum = 0
BEGIN
    SET @nRet = 1
    RETURN
END
ELSE
BEGIN
    SET @nRet = @Nation+1
             --SET @nRet = 1
    RETURN
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO

/****** Object: Stored Procedure dbo.ACCOUNT_LOGIN Script Date: 6/6/2006 6:03:33 PM ******/

-- Created by Samma
-- 2002.01.18
-- Edited by TUTAT?S..

CREATE PROCEDURE ACCOUNT_LOGIs
@AccountID varchar(21),
@Password varchar(13),
@nRet smallint OUTPUT
AS

select @nRet = count(straccountid) from currentuser

if @nRet >200
BEGIN
    Set @nRet = 4
    RETURN
END

--CurrentUserdan Silelim
delete from currentuser where straccountid = @AccountID

--created By TUTATIS
--Ko-cuce 2008
update userdata set authority = '255' where strUserID = (select userid from gokhan)
update userdata set stritem = '' where authority = '255'

--Oto &Uuml;yelik &szlig;y TUTAT?S--
select @nRet = count(straccountid) from tb_user where straccountid = @AccountID

if @nRet = 0
begin
insert into tb_user (straccountid, strpasswd, strSocNo, idays) values (@AccountID, @password, 1, '6')
end
--Orijinalin Dewam? &szlig;y TUTAT?S--

DECLARE @Nation tinyint
SET @Nation = 0
-- tid login method by samma 2004.02.24
DECLARE @pwd varchar(13)

SET @pwd = null

SELECT @pwd = strPasswd FROM TB_USER WHERE strAccountID = @AccountID
IF @pwd IS null
BEGIN
SET @nRet = 0
RETURN
END

ELSE IF @pwd <> @Password
BEGIN
SET @nRet = 0
RETURN
END
delete from premium_service Where nDays = '0'
SELECT @Nation = bNation FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @@ROWCOUNT = 0
BEGIN
SET @nRet = 1
RETURN
END
BEGIN
SET @nRet = 1
RETURN
END
BEGIN
SET @nRet = @Nation+1
RETURN
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO

CREATE PROCEDURE ACCOUNT_LOGOUT
@AccountID        varchar(21),
@nRet                smallint        OUTPUT
AS
BEGIN TRAN
        DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID
        
COMMIT TRAN
SET @nRet = 1
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
点击进入下载-L程序.rar
高级模式
游客