Specific Query request

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    Specific Query request

    Does anybody know what query I could run to delete all the users who are prefixed with "imported_" and that have 0 posts?

    This would save a lot of time merging users .. they have 0 posts, so why bother merging?..
  • Jerry
    Senior Member
    • Dec 2002
    • 9137
    • 1.1.x

    #2
    Of the top of my head I would go with this to find them :

    Code:
    SELECT * FROM user WHERE username LIKE "imported_%" AND posts = 0;
    And to delete :

    Code:
    DELETE FROM user WHERE username LIKE "imported_%" AND posts = 0;
    I wrote ImpEx.

    Blog | Me

    Comment

    • Floris
      Senior Member
      • Dec 2001
      • 37767

      #3
      Thank you!

      Comment

      • KAWIE1
        New Member
        • Jul 2008
        • 24
        • 3.6.x

        #4
        Originally posted by Jerry
        Of the top of my head I would go with this to find them :

        Code:
        SELECT * FROM user WHERE username LIKE "imported_%" AND posts = 0;
        And to delete :

        Code:
        DELETE FROM user WHERE username LIKE "imported_%" AND posts = 0;
        Thanks

        Comment

        • Jamey
          New Member
          • Apr 2009
          • 9
          • 3.8.x

          #5
          Great post

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...