Experienced Elementalist
- Joined
- Dec 16, 2007
- Messages
- 227
- Reaction score
- 0
Hope this guide will help a lot of our co-ragezoner.
1. make a back up of your database.
2. open your RanUser>Tables>UserInfo.dbo>Triggers
Rightclick Triggers and Select New Triggers.
3. Copy and Paste this Script and Press Execute:
For DELETING INACTIVE ACCOUNT:
Note: change CREATE to ALTER if you have existing TRIGGERS.
1 = how many days before it delete from database.
for DELETING INACTIVE CHARACTER:
1. open your RanGame1>Tables>ChaInfo.dbo
rightclick ChaInfo.dbo and click Design
2. scroll down at the buttom of the list,
make a new COLUMN and name it "ChaLastLoginDate"
DATATYPE = DATETIME
UNCHECK "ALLOW NULL"
3. Set the Default Value or Binding = (getdate())
4. Press Execute!
5. open your Rangame1>tables>chainfo.dbo>trigger
rightclick trigger and click new trigger.
6. copy and paste this script:
Note: change CREATE to ALTER if you have existing TRIGGERS.
make sure that the day before deleting the inactive character
is same as inactive account.
CREDIT TO: Sir Skyblue for his DELETING INACTIVE ACCOUNT.
1. make a back up of your database.
2. open your RanUser>Tables>UserInfo.dbo>Triggers
Rightclick Triggers and Select New Triggers.
3. Copy and Paste this Script and Press Execute:
For DELETING INACTIVE ACCOUNT:
Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[inactive] ON [dbo].[UserInfo]
after update
as
BEGIN
DELETE FROM [UserInfo] WHERE DATEDIFF(day,[UserInfo].LastLoginDate, GETDATE()) >= 1
END
Note: change CREATE to ALTER if you have existing TRIGGERS.
1 = how many days before it delete from database.
for DELETING INACTIVE CHARACTER:
1. open your RanGame1>Tables>ChaInfo.dbo
rightclick ChaInfo.dbo and click Design
2. scroll down at the buttom of the list,
make a new COLUMN and name it "ChaLastLoginDate"
DATATYPE = DATETIME
UNCHECK "ALLOW NULL"
3. Set the Default Value or Binding = (getdate())
4. Press Execute!
5. open your Rangame1>tables>chainfo.dbo>trigger
rightclick trigger and click new trigger.
6. copy and paste this script:
Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER [dbo].[chardeletion] ON [dbo].[ChaInfo]
after update
as
BEGIN
DELETE FROM [ChaInfo] WHERE DATEDIFF(day,[ChaInfo].ChaLastLoginDate, GETDATE()) >= 1
END
Note: change CREATE to ALTER if you have existing TRIGGERS.
make sure that the day before deleting the inactive character
is same as inactive account.
CREDIT TO: Sir Skyblue for his DELETING INACTIVE ACCOUNT.
Last edited: