Skip to content

[Help] Request SQL Query code

Featured Replies

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!!

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!

  • Author

Thank you very much Stive, you're awesome!.

Thank you very much Stive, you're awesome!.

If you have any further questions, pm me to unlock it.

 

-Locked.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.