Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: No se suman las horas online en la tabla memb_stat  (Visto 958 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline Sklex Posteado: November 25, 2018, 08:31:33 PM

  • 0 puntos por ventas
  • *
  • Rank: Avanzado
  • Posts: 122
  • Gracias recibida: 14
  • ve
hola como están ? alguien sabe la solución al error de las horas online que no se suman ? en la tabla memb_stat ? utilizo los files muemu update 13

saludos!

Gracias:


Offline Cloud #1 Posteado: November 26, 2018, 06:12:05 AM

  • 0 puntos por ventas
  • *
  • Rank: Avanzado
  • Posts: 137
  • Gracias recibida: 12168
  • ar
hola como están ? alguien sabe la solución al error de las horas online que no se suman ? en la tabla memb_stat ? utilizo los files muemu update 13

saludos!
intenta poner esta sentencia en tu sql

Spoiler for Hiden:
USE [MuOnline]
GO
/****** Object:  StoredProcedure [dbo].[WZ_DISCONNECT_MEMB]    Script Date: 11/10/2018 17:26:58 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO

         ALTER PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]
         @memb___id varchar(10)
         AS
         Begin   
         set nocount on
            Declare  @find_id varchar(10)
            Declare @ConnectStat tinyint
            Set @ConnectStat = 0
            Set @find_id = 'NOT'
            select @find_id = S.memb___id COLLATE DATABASE_DEFAULT from [MuOnline].[dbo].[MEMB_STAT] S INNER JOIN [MuOnline].[dbo].[MEMB_INFO] I ON S.memb___id = I.memb___id COLLATE DATABASE_DEFAULT
                  where I.memb___id = @memb___id

            if( @find_id <> 'NOT' )
            begin      
               update [MuOnline].[dbo].[MEMB_STAT] set ConnectStat = @ConnectStat, DisConnectTM = getdate(), OnlineHours = OnlineHours + DATEDIFF(hh,ConnectTM,getdate())
                where memb___id = @memb___id
            end
         end

Gracias:


Offline Sklex #2 Posteado: November 26, 2018, 06:18:28 AM

  • 0 puntos por ventas
  • *
  • Rank: Avanzado
  • Posts: 122
  • Gracias recibida: 14
  • ve
vale voy a probar esa query y te aviso, gracias amigo ;)


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
10 Replies
5381 Views
Last post February 05, 2019, 01:42:00 PM
by juanka2
1 Replies
1581 Views
Last post April 29, 2022, 02:03:02 AM
by Mayealdhost
2 Replies
1483 Views
Last post April 20, 2017, 10:55:06 PM
by kayorem
12 Replies
4934 Views
Last post February 14, 2022, 06:50:25 PM
by muarcontes
0 Replies
717 Views
Last post October 03, 2018, 02:00:31 PM
by skarious