XMB Forum Software
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: [Resolved] purging / deleting logins
quibel
Member
***




Posts: 24
Registered: 8-27-2013
Member Is Offline


[*] posted on 8-27-2013 at 08:17 AM
[Resolved] purging / deleting logins


Full Board URL: www.club-k.co.nz
XMB Version: 1.9.11

What is the best way for me to delete logins if

they are over 1yr old
have no posts
and havent been logged in, in the last year.

I wouldnt mind a list before confirming deletion but I just want to tidy up the user datadase.

Q


View user's profile View All Posts By User
lottos
Administrator
********




Posts: 482
Registered: 6-3-2002
Member Is Offline

Mood: pass me a TimTam

[*] posted on 8-27-2013 at 09:48 AM


http://forums.xmbforum2.com/viewthread.php?tid=776813


SELECT * from xmb_members where lastvisit < 'DATETIME' AND regdate < 'DATETIME' AND postnum = '0'

DELETE from xmb_members where lastvisit < 'DATETIME' AND regdate < 'DATETIME' AND postnum = '0'



View user's profile View All Posts By User
quibel
Member
***




Posts: 24
Registered: 8-27-2013
Member Is Offline


[*] posted on 8-27-2013 at 10:39 AM


That looks like it will work when i run the select version ...man its a large list .... eek.

I use the moderator/platinum member hack for paying members so dont want to delete any moderator stats .... also thinking about it regdate is irrelivant so

If I want to check against
lastvisit < 'DATETIME'
postnum = '0'
status = 'Member'

could I just modify the two statements to below to acheive the same thing

SELECT * from xmb_members where lastvisit < 'DATETIME' AND postnum = '0' AND status = ' Member'

DELETE from xmb_members where lastvisit < 'DATETIME' AND postnum = '0' AND status = ' Member'


Thanks

Q
View user's profile View All Posts By User
quibel
Member
***




Posts: 24
Registered: 8-27-2013
Member Is Offline


[*] posted on 8-27-2013 at 07:42 PM


just noticed lastvisit = '0' if they have never visited since registration. I have maybe 15 accouts in that status so will need to add the regdate back in there to correct that

consider me resolved - please close

Q
View user's profile View All Posts By User

  Go To Top

Powered by XMB 1.9.12
XMB Forum Software © 2001-2025 The XMB Group
[Queries: 16] [PHP: 13.2% - SQL: 86.8%]