CREATE PROCEDURE [dbo].[WZ_CONNECT_MEMB]
@uid varchar(20),
@server varchar(20),
@uip varchar(20)
AS
BEGIN
BEGIN TRANSACTION
SET NOCOUNT ON
IF EXISTS (SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED) WHERE memb___id = @uid)
BEGIN
UPDATE MEMB_STAT SET ip = @uip, connectstat = 1, servername = @server, ConnectTM = (GETDATE()) WHERE memb___id = @uid
END
ELSE
BEGIN
INSERT INTO MEMB_STAT ( memb___id,ip,connectstat,servername) VALUES (@uid, @uip, 1, @server)
END
IF EXISTS (SELECT account FROM [dmncms].dbo.DmN_IP_Log WITH (READUNCOMMITTED) WHERE account = @uid AND ip = @uip)
BEGIN
UPDATE [dmncms].dbo.DmN_IP_Log SET last_connected = (GETDATE()), login_type = 0 WHERE account = @uid AND ip = @uip
END
ELSE
BEGIN
INSERT INTO [dmncms].dbo.DmN_IP_Log (account, ip, last_connected) VALUES (@uid, @uip,GETDATE())
END
IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION
SET NOCOUNT OFF
END
================================================================================
Invalid column name 'login_type'.
================================================================================
@uid varchar(20),
@server varchar(20),
@uip varchar(20)
AS
BEGIN
BEGIN TRANSACTION
SET NOCOUNT ON
IF EXISTS (SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED) WHERE memb___id = @uid)
BEGIN
UPDATE MEMB_STAT SET ip = @uip, connectstat = 1, servername = @server, ConnectTM = (GETDATE()) WHERE memb___id = @uid
END
ELSE
BEGIN
INSERT INTO MEMB_STAT ( memb___id,ip,connectstat,servername) VALUES (@uid, @uip, 1, @server)
END
IF EXISTS (SELECT account FROM [dmncms].dbo.DmN_IP_Log WITH (READUNCOMMITTED) WHERE account = @uid AND ip = @uip)
BEGIN
UPDATE [dmncms].dbo.DmN_IP_Log SET last_connected = (GETDATE()), login_type = 0 WHERE account = @uid AND ip = @uip
END
ELSE
BEGIN
INSERT INTO [dmncms].dbo.DmN_IP_Log (account, ip, last_connected) VALUES (@uid, @uip,GETDATE())
END
IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION
SET NOCOUNT OFF
END
================================================================================
Invalid column name 'login_type'.
================================================================================