Announcement

Collapse
No announcement yet.

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

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

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

    Sql query - Remove tags massively????
    Last edited by bobichus; Tue 8th Sep '09, 8:53am.

  • #2
    What do you mean by "label"?

    Comment


    • #3
      Originally posted by cellarius View Post
      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


      • #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 8th Sep '09, 9:33am.

        Comment


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

          thank you very much for your help

          Comment


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

            Comment


            • #7
              Originally posted by cellarius View Post
              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


              • #8
                Did you add the database prefix?

                Comment


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

                  Comment


                  • #10
                    tag, tagsearch, tagthread

                    Comment


                    • #11
                      Originally posted by bobichus View Post
                      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


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

                        Comment


                        • #13
                          Originally posted by cellarius View Post
                          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


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

                            Comment


                            • #15
                              Originally posted by cellarius View Post
                              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...
                              X