Announcement

Collapse
No announcement yet.

Clearing IP fields for database.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clearing IP fields for database.

    I would like to clear all the ips out of the databases for users but I'm unsure on how to. Is this a smart idea? I think alot of the space on the database is taken up by the logging of ip's and after 3 years I would like to clear it at least one time. No one is banned on my forums or anything so that won't get messed up.

    What query should I run on the database?

  • #2
    Nothing?

    Comment


    • #3
      I can't guarantee this so I srtongly recommend you make a good backup of your database first:

      DELETE ipaddress FROM user;
      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
      Change CKEditor Colors to Match Style (for 4.1.4 and above)

      Steve Machol Photography


      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


      Comment


      • #4
        Will that completely remove the field or just erase whats in it?

        Comment


        • #5
          I won't guarantee anything which is why I said to make a backup. However this *should* only clear the info field, not delete the field entirely.
          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
          Change CKEditor Colors to Match Style (for 4.1.4 and above)

          Steve Machol Photography


          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


          Comment


          • #6
            Originally posted by Steve Machol
            I won't guarantee anything which is why I said to make a backup. However this *should* only clear the info field, not delete the field entirely.
            SQL-query :

            DELETE ipaddress FROM user
            MySQL said:


            You have an error in your SQL syntax near 'ipaddress FROM user' at line 1


            Also, the ip's I'm talking about removing are the ones added with posts or the ones you search in the Admin CP under IP ADDRESSES for find user.

            Comment


            • #7
              Sorry then. I don't know the correct query to do this.
              Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
              Change CKEditor Colors to Match Style (for 4.1.4 and above)

              Steve Machol Photography


              Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


              Comment


              • #8
                Originally posted by Steve Machol
                Sorry then. I don't know the correct query to do this.
                Thanks for trying. D;

                Comment


                • #9
                  I think these will work. Backup first of course:

                  UPDATE user SET ipaddress='';
                  UPDATE post SET ipaddress='';
                  Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                  Change CKEditor Colors to Match Style (for 4.1.4 and above)

                  Steve Machol Photography


                  Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                  Comment

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