Jump to content
  • 0

Delete all account that didn't login for 1 week


PewN

Question


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.04
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

is there any command on sql that you can delete all account's that didn't login for 1 week? ex. i didn't online my account for 1 week and 2 days my account will automatically delete when i execute the command on sql.

 

but if i didn't online my account for 4 days my will not be deleted.
 

 

thanks 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   241
  • Joined:  09/05/12
  • Last Seen:  

Let's try this : 

DELETE FROM `login` WHERE DATEDIFF(NOW(), `lastlogin`) > 6;

I don't have responsibilities if something went wrong. Please do a backup before you do something :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  208
  • Reputation:   11
  • Joined:  05/31/12
  • Last Seen:  

Patskie i think it would work but trojan it is not a good idea to delete accounts within 7 days of not loging in /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   241
  • Joined:  09/05/12
  • Last Seen:  

And i think i just only delete the account not the whole account ( including characters :D )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...