• What’s the MySQL command for deleting users with no posts written, or not loggin since a particular day, etc.? Is there a plugin for this kind of stuff?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You can delete them through the admin panel

    Thread Starter hoder

    (@hoder)

    I know. I mean not manually. Because there might be thousands of them.

    Thread Starter hoder

    (@hoder)

    It must be a very simple MySQL command line. Anyone? Please. My database is exploding…

    If you are running MySQL 4.1 (does not work with 4.0), you can do this:

    delete from users where id not in (select distinct post_author from posts) and user_login != ‘admin’;

    I added the extra check for the user “admin” because I never post with that account.

    This does NOT check if the person has posted comments. You might want to consider that before running the query.

    Thread Starter hoder

    (@hoder)

    My host is actually using version 4.0. How can I use this in that version?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Delete users with no posts’ is closed to new replies.