1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Delete IP of multiple members

Discussion in 'XenForo Questions and Support' started by Bob_R, Mar 18, 2016.

  1. Bob_R

    Bob_R Active Member

    I know how to change the IP of a member. I know how to delete all members IP's. I know how to delete a single IP of a member.

    My question is can multiple members IP's be deleted? Not all members but more than one member at a time?
     
    SevgiForum likes this.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    There is no option to selectively delete IP records.
     
    SevgiForum likes this.
  3. Bob_R

    Bob_R Active Member

    So, I can only do one at a time?

    Code:
    DELETE
    FROM xf_ip
    WHERE user_id = 1
     
    SevgiForum likes this.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You could use an array or write a small script to loop through.
     
    SevgiForum likes this.
  5. Bob_R

    Bob_R Active Member

    OK, thanks there are only 18. I'll just do it one at a time. I thought you could seperate the user id's by comma.

    Code:
    DELETE
    FROM xf_ip
    WHERE user_id = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
     
  6. wang

    wang Well-Known Member

    Use IN instead of = in the query to select multiple users.
     
    SevgiForum and Bob_R like this.
  7. SevgiForum

    SevgiForum New Member

    HOW TO DO !

    Sample
    multiple
    DELETE FROM m WHERE user_id IN (3,1.5.7)

    :) complete
     
    Last edited: Apr 5, 2017

Share This Page