USE [MuOnline]
GO
DROP PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]
GO
CREATE PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]
@memb___id varchar(10)
AS
Begin
set nocount on
Declare @find_id varchar(10)
Declare @ConnectStat tinyint
Declare @OnlineHours real
Set @ConnectStat = 0
begin

SELECT @OnlineHours = OnlineHours FROM MEMB_STAT WHERE memb___id = @memb___id

Update MEMB_INFO SET gold = gold+(@OnlineHours * 2) WHERE memb___id = @memb___id and @OnlineHours >= '1'

Update MEMB_STAT SET OnlineHours = 0 WHERE memb___id = @memb___id

end
end
GO

Tenta ae acabei de usar aqui no meu SQL e foi de boa!


Caso n resolve converse comigo por MP antes que isso vire 1 bate papo