• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

MySQL Database

Deaktiver

Materia
Joined
Nov 25, 2007
Messages
642
Reaction score
7
Location
Germany
Hello,

today I need help with my MySQL databse. There are over 5000 registered players and I need a System/Tool/Programm that delet EVERY INACTIV player and account after 1 month. I saw something 3 months ago but I didnt remember..I am using nicaw acc I saw this system on avarins aac but I don't remember..
I hope someone can help me


Thanks!
 
Last edited:
Im not very sure but to tell you my tought, there are some commands for phpmyadmin. It would remove players that didnt login with 30 days or the days you set. I know its possible in that way because I had the code long time ago but I ain't sure now if still works.
 
It's easy to do :)

Code:
DELETE FROM players WHERE lastlogin < 'INACTIVE_TIME_LIMIT';
To calculate the INACTIVE_TIME_LIMIT you can use this script:

PHP:
<?php
$inactive_days = 90; # edit it with the max inactive days (1 = 1 day)

$inactive_time = 86400 * $inactive_days;
$inactive_time_limit = time() - $inactive_time;
echo $inactive_time_limit;
?>

I've not tested it, but may be work :p

#edit

It will delete all players that never logged in too :X
 
Last edited:
Back
Top