Announcement

Collapse
No announcement yet.

Renaming tags

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

  • Renaming tags

    Hi,

    one of our most popular tags has to be renamed. I looked at the database structure and found out that the tags are stored in the tags-table and when you add them to a thread, the relation is stored in the table tagthread. So I can rename the tags in the tags table and the results when clicking on a tag in the cloud will be the same as before. The same goes for the tag-search - it seems the manually entered tags are looked up in the tags table and if found, the result is constructed with the help of the tagthread table.

    So far, so good. But then I noticed that in the tread table there is a field taglist, which contains no relation to the tags table but instead the tags themselves. Now I have to change all the occurences of the tag I want to rename in hundreds of thread-rows? Why didn`t you use a relation here?

    ciao,
    Sacha
    Thermomix, Rezepte und Küchenmaschinen

  • #2
    The relation is in the tagthread table. The thread.taglist field appears to be just a cached listing for use in the threadbits to avoid having to do a table join. Rebuilding the thread info may update that list:

    Admin CP -> Maintenance -> Update Counters -> Rebuild Thread Information

    Otherwise you can do a string replacement query on that field.

    Comment


    • #3
      Hello Jake,
      Originally posted by Jake Bunce View Post
      Rebuilding the thread info may update that list:
      thank you, I`ll give it a try.

      Otherwise you can do a string replacement query on that field.
      thanks again. I thought this would require a script but it seems to be possible with just something like that:
      Code:
      UPDATE table_name SET column_name = REPLACE(column_name,"original_string","replace_string");
      all the best,
      Sacha
      Thermomix, Rezepte und Küchenmaschinen

      Comment


      • #4
        Hi,
        Originally posted by Jake Bunce View Post
        Rebuilding the thread info may update that list:

        Admin CP -> Maintenance -> Update Counters -> Rebuild Thread Information
        sorry but it doesn`t work.
        Otherwise you can do a string replacement query on that field.
        yes:
        Code:
        UPDATE thread SET taglist = REPLACE(taglist,"old tagname","new tagname")
        works fine.

        all the best,
        Sacha
        Thermomix, Rezepte und Küchenmaschinen

        Comment

        Related Topics

        Collapse

        Working...
        X