delete all the labels on my forum, with an SQL query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bobichus
    Member
    • Dec 2008
    • 70
    • 4.2.X

    delete all the labels on my forum, with an SQL query

    Sql query - Remove tags massively????
    Last edited by bobichus; Tue 8 Sep '09, 7:53am.
  • cellarius
    Senior Member
    • Aug 2005
    • 4586
    • 3.8.x

    #2
    What do you mean by "label"?

    Comment

    • bobichus
      Member
      • Dec 2008
      • 70
      • 4.2.X

      #3
      Originally posted by cellarius
      What do you mean by "label"?
      Anyone know what the query needs to be done (code) to eliminate the mass tags?.

      Within automatic queries that come by default in vbulletin and not go deleting one by one from the control panel is endless.

      Comment

      • cellarius
        Senior Member
        • Aug 2005
        • 4586
        • 3.8.x

        #4
        Backup your database first! Always make sure you have a current backup before running queries.

        Run the follwing queries:

        TRUNCATE TABLE tag
        TRUNCATE TABLE tagthread

        Make sure you add the prefix to the table name if you have one defined (i.e. 'vb_tag'). This will completely empty the two tables, thus discarding all your tags and all deleting all tags from threads.
        Last edited by cellarius; Tue 8 Sep '09, 8:33am.

        Comment

        • bobichus
          Member
          • Dec 2008
          • 70
          • 4.2.X

          #5
          doing these 2 queries to remove all tags???

          thank you very much for your help

          Comment

          • cellarius
            Senior Member
            • Aug 2005
            • 4586
            • 3.8.x

            #6
            Yes. The first table contains the tags themselves, the second links them to the threads.

            Comment

            • bobichus
              Member
              • Dec 2008
              • 70
              • 4.2.X

              #7
              Originally posted by cellarius
              Yes. The first table contains the tags themselves, the second links them to the threads.

              An error occurred while attempting to execute your query. The following information was returned.
              Error number: 1064
              Error Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near''tag''at line 1

              Comment

              • cellarius
                Senior Member
                • Aug 2005
                • 4586
                • 3.8.x

                #8
                Did you add the database prefix?

                Comment

                • bobichus
                  Member
                  • Dec 2008
                  • 70
                  • 4.2.X

                  #9
                  Originally posted by cellarius
                  Did you add the database prefix?
                  not know which is the prefix of the database

                  Comment

                  • bobichus
                    Member
                    • Dec 2008
                    • 70
                    • 4.2.X

                    #10
                    tag, tagsearch, tagthread

                    Comment

                    • cellarius
                      Senior Member
                      • Aug 2005
                      • 4586
                      • 3.8.x

                      #11
                      Originally posted by bobichus
                      not know which is the prefix of the database
                      Open includes/config.php file; look for a line like this:
                      Code:
                      $config['Database']['tableprefix'] = 'vb_';
                      In this case, vb_ would be the prefix. The tables would thus be called vb_tags and vb_tagthread.

                      Comment

                      • cellarius
                        Senior Member
                        • Aug 2005
                        • 4586
                        • 3.8.x

                        #12
                        Damn, leave the singlequotes away, it's just TRUNCATE TABLE tag. Edited above post accordingly. Sorry for the confusion.

                        Comment

                        • bobichus
                          Member
                          • Dec 2008
                          • 70
                          • 4.2.X

                          #13
                          Originally posted by cellarius
                          Open includes/config.php file; look for a line like this:
                          Code:
                          $config['Database']['tableprefix'] = 'vb_';
                          In this case, vb_ would be the prefix. The tables would thus be called vb_tags and vb_tagthread.

                          this is my config.php $ config [ 'Database'] [ 'tableprefix'] ='';

                          Comment

                          • cellarius
                            Senior Member
                            • Aug 2005
                            • 4586
                            • 3.8.x

                            #14
                            Did you see my last post? Run the queries without the single quotes.

                            Comment

                            • bobichus
                              Member
                              • Dec 2008
                              • 70
                              • 4.2.X

                              #15
                              Originally posted by cellarius
                              Did you see my last post? Run the queries without the single quotes.


                              I put this in my config.php

                              $config['Database']['tableprefix'] = 'vb_';

                              Comment

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