XMB Forum Software

[Resolved] purging / deleting logins

quibel - 8-27-2013 at 08:17 AM

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



lottos - 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'

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

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