Announcement

Collapse
No announcement yet.

Delete content of Instant Messaging fields

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

  • Delete content of Instant Messaging fields

    Hi,

    I recent import my board from ubb to vb3. Now I need to erase the content of all Instant Messaging fields from database because I use this fields in ubb for other porpuses. Now, I want to use this for instant message but I need clear the actual data stored in this fields.

    Many thanks

    Carlos

  • #2
    Do you mean the IM fields in the user profile, like MSN, AIM, yahoo etc ?
    I wrote ImpEx.

    Blog | Me

    Comment


    • #3
      Try this

      make a script called IMreset.php and fill it with this content:

      PHP Code:
      <?php
      /* 
      This script is NOT official, not support and not tested - make a backup of your database first!
      Made by Floris - no fluffy animals were hurt during the making of this script
      */
      include('./global.php');
      include(
      './includes/adminfunctions.php');
      echo(
      "Untested - update all IM fields from all users to empty");
      echo(
      "Resetting MSN, AIM, ICQ, Yahoo");
      $DB_site->query("UPDATE " TABLE_PREFIX "user SET msn='', icq ='', yahoo='', aim=''");
      build_options();
      echo(
      "IM fields reset");
      echo(
      "Remove this script from your server now!");
      ?>
      (now that I think of it, you might need to goto the acp > users, and edit 1 user, save his profile, so it will rebuild users.
      Last edited by Floris; Thu 2 Sep '04, 8:55am.

      Comment


      • #4
        Yes

        Comment


        • #5
          Many Thanks Floris, I try it with your script

          Comment


          • #6
            This SQL will do that :

            Code:
             UPDATE user SET msn='', icq ='', yahoo='', aim='';

            Though you will need to add your table prefix to the tablename (i.e. vb3_user) if you have one.
            I wrote ImpEx.

            Blog | Me

            Comment


            • #7
              Many thanks Jerry,

              Then with only this SQL I get erase all field data?
              It´s more easy of Floris script

              Code:
               
              UPDATE user SET msn='', icq ='', yahoo='', aim='';

              Comment


              • #8
                Originally posted by Jerry
                This SQL will do that :

                Code:
                 UPDATE user SET msn='', icq ='', yahoo='', aim='';

                Though you will need to add your table prefix to the tablename (i.e. vb3_user) if you have one.
                Woopsy!

                Updated script

                Comment


                • #9
                  Originally posted by carlosdx
                  Many thanks Jerry,

                  Then with only this SQL I get erase all field data?
                  It´s more easy of Floris script

                  Code:
                   
                  UPDATE user SET msn='', icq ='', yahoo='', aim='';
                  Yes, either will do it.
                  I wrote ImpEx.

                  Blog | Me

                  Comment


                  • #10
                    Originally posted by Jerry
                    Yes, either will do it.
                    I just put the query in a script, so the table prefix is taken into account and you only have to load the script instead of phpmyadmin, etc. Whatever feels more comfortable for you.

                    Comment

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