[HOW-TO] 1 line mySQL QUERY to delete users inactive 6 months with 0 posts
#1
Lightbulb 
This is an easy SQL Query that you can run in phpMyAdmin

DELETE FROM mybb_users where postnum = '0' and lastvisit < '1229691992';

This query delete users from database with last visit in Dec.14 2008 or later and 0 posts...

Use this form to your needs: http://www.unixtimestamp.com/index.php



...
Reply
#2
Nice Tutorial thanks great man
Reply
#3
This user has been denied support. This user has been denied support.
can u provide for me command for last active..one year..
Reply
#4
Run this;
DELETE FROM mybb_users where postnum = '0' and lastvisit < '2459383984'; 
Reply
#5
Nice tutorials, thanks
Reply
#6
you can use UNIX_TIMESTAMP() to convert the date for you, assuming you are using MySQL or another RDBMS that supports that function.

DELETE FROM mybb_users where postnum = '0' and lastvisit < UNIX_TIMESTAMP('2010-10-30 00:00:00')
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#7
This tutorial is redundant for MyBB 1.6 as the new version supports User Pruning.
No PM support
My YouTube
Reply
#8
(2011-04-10, 11:02 AM)Shukaku Wrote: This tutorial is redundant for MyBB 1.6 as the new version supports User Pruning.

So you had to go and find it just to state it?

Some people, such as myself, prefer queries then backend edits.
I'm not here often, shoot a PM or whatever if you want my discord.
Reply
#9
(2011-04-10, 06:19 PM)Aristotle Wrote:
(2011-04-10, 11:02 AM)Shukaku Wrote: This tutorial is redundant for MyBB 1.6 as the new version supports User Pruning.
Some people, such as myself, prefer queries then backend edits.

>>as the new version supports User Pruning.

wat
good u
Reply
#10
(2011-04-10, 06:19 PM)Aristotle Wrote: So you had to go and find it just to state it?
No, someone bumped this 2 year old thread, that's why I stated it...

@Scoutie: Yep. Toungue
No PM support
My YouTube
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)