Jump to content
  • 0

[Help] Request SQL Query code


Question

Posted

Hi guys, I have a request because I didn't find it anywhere, I need an SQL query code to delete characters and accounts who have been inactive for 1 month and all their data from the l2jdb, can someone help me?. Thanks in advance!!

3 answers to this question

Recommended Posts

  • 0
Posted

Delete from Server All Data of Character that is not active more then 1 month.

Code:

 

DELETE FROM characters WHERE lastAccess < 155520000;

DELETE FROM character_quests WHERE char_id=(SELECT obj_id FROM characters WHERE lastAccess < 155520000);

DELETE FROM items WHERE owner_id=(SELECT obj_id FROM characters WHERE lastAccess < 155520000);

DELETE FROM character_shortcuts WHERE char_obj_id=(SELECT obj_id FROM characters WHERE lastAccess < 155520000);

DELETE FROM character_skills WHERE char_obj_id=(SELECT obj_id FROM characters WHERE lastAccess < 155520000);

DELETE FROM character_skills_save WHERE char_obj_id=(SELECT obj_id FROM characters WHERE lastAccess < 155520000);

DELETE FROM character_subclasses WHERE char_obj_id=(SELECT obj_id FROM characters WHERE lastAccess < 155520000);

 

Here you are my friend!

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..