Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: VIP Auto Expiracion  (Visto 1545 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline jhoancito Posteado: June 29, 2019, 06:17:50 PM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 247
  • Gracias recibida: 666
  • bo
Code: [Select]
USE [MuOnline]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER Procedure [dbo].[WZ_GetAccountLevel]
 @account varchar(10)
AS
BEGIN

SET NOCOUNT ON
SET XACT_ABORT ON

DECLARE @CurrentAccountLevel int
DECLARE @CurrentAccountExpireDate smalldatetime

SELECT @CurrentAccountLevel = AccountLevel, @CurrentAccountExpireDate = AccountExpireDate FROM MEMB_INFO WHERE memb___id = @account

IF (@CurrentAccountLevel <> 0 AND GETDATE() > @CurrentAccountExpireDate)
BEGIN
SET @CurrentAccountLevel = 0
UPDATE MEMB_INFO SET AccountLevel = @CurrentAccountLevel, AccountExpireDate = @CurrentAccountExpireDate WHERE memb___id = @account
END

SELECT @CurrentAccountLevel as AccountLevel, @CurrentAccountExpireDate as AccountExpireDate

SET NOCOUNT OFF
SET XACT_ABORT OFF

END
GO

SET ANSI_NULLS OFF
GO

SET QUOTED_IDENTIFIER OFF
GO


Para agregar VIP a la cuenta, envíe a la base de datos MuOnline siguiendo la consulta:

Code: [Select]
 UPDATE MEMB_INFO SET AccountLevel = 1, AccountExpireDate = GETDATE() + 30 WHERE memb___id = 'LOGIN'

 LEGEND: 1 - Account Level (AL0, AL1, AL2, AL3)
 30 - VIP Days
 LOGIN - Ingreso a la cuenta

Gracias:


Offline kayito #1 Posteado: June 29, 2019, 06:45:13 PM

  • MAESTRO

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 1.037
  • Gracias recibida: 15353
  • ar
Buen aporte, muy util para los files que no lo tengan implementado.


Offline Rescate #2 Posteado: June 29, 2019, 07:56:17 PM

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 503
  • Gracias recibida: 7361
  • ar
No me sirvió,ya que me pide una columna que no tengo. :(


Offline jhoancito #3 Posteado: June 30, 2019, 08:59:07 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 247
  • Gracias recibida: 666
  • bo
No me sirvió,ya que me pide una columna que no tengo. :(



tiene que crear la columna en la db


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
9 Replies
9708 Views
Last post January 12, 2020, 08:26:17 AM
by darkjano
3 Replies
1650 Views
Last post May 06, 2019, 12:05:16 PM
by CAPITOL
11 Replies
1969 Views
Last post March 01, 2020, 03:46:42 PM
by EmmaDCG
26 Replies
7265 Views
Last post May 16, 2021, 02:16:42 PM
by franchu123
20 Replies
3272 Views
Last post May 13, 2021, 06:01:04 PM
by legacy101